Then create your playbook yaml adding the role elasticsearch and overriding any variables you wish. It can be as simple as this to take all the defaults:
Make sure your hosts are defined in your ```hosts``` file with the appropriate ```ansible_ssh_host```, ```ansible_ssh_user``` and ```ansible_ssh_private_key_file``` values.
Which major version to use. This is also used to define which the repository is used.
```es_version``` (e.g. `1.7.0`)
Which minor version to use.
```es_start_service``` (true (default) or false)
Should elasticsearch be startet after installation?
```es_use_repository``` (true (default) or false )
Should elasticsearch be installed from a repository or from a url download. If false package will be downloaded from https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch.... You can also specify `es_custom_package_url` with a url to a custom package.
```es_version_lock``` (true or false (default))
This will lock the elasticsearch version using `yum versionlock` or `apt-mark hold`.
```es_scripts``` (true or false (default))
If true you need to supply a files/scripts/ folder with your scripts, inside the role directory. The folder and all files will be copied to `/etc/elasticsearch/scripts`. You can also provide a scripts/ folder at toplevel of your playbook.
```es_plugins_reinstall``` (true or false (default) )
Schould plugins be reinstalled?
```es_plugins``` (an array of plugin definitons e.g.:)