More detailed docs

This commit is contained in:
Robin Clarke 2015-05-13 14:22:04 +02:00
parent 9dbc1babbb
commit 8020b9d134

View file

@ -17,13 +17,32 @@ mkdir -p roles
ln -s /my/repos/ansible-elasticsearch ./roles/elasticsearch ln -s /my/repos/ansible-elasticsearch ./roles/elasticsearch
``` ```
Then create your playbook yaml adding the role elasticsearch and overriding any variables you wish, e.g. 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:
``` ```
--- ---
- hosts: centos hosts: my_host
sudo: yes roles:
- elasticsearch
tasks:
- .... your tasks ...
```
or more complex..
```
---
hosts: my_host
roles:
- elasticsearch
vars: vars:
java_packages:
- "oracle-java7-installer"
es_major_version: 1.4
es_version: 1.4.4
es_start_service: false
es_plugins_reinstall: false es_plugins_reinstall: false
es_plugins: es_plugins:
- plugin: elasticsearch-cloud-aws - plugin: elasticsearch-cloud-aws
@ -36,13 +55,11 @@ Then create your playbook yaml adding the role elasticsearch and overriding any
version: latest version: latest
- plugin: elasticsearch-support-diagnostics - plugin: elasticsearch-support-diagnostics
version: latest version: latest
roles:
- elasticsearch
tasks: tasks:
- .... your tasks ... - .... your tasks ...
``` ```
Make sure your host is defined in your ```hosts``` file. 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.
Then run it: Then run it: