From 8020b9d134297038ef10d751a751b481c9841a3c Mon Sep 17 00:00:00 2001 From: Robin Clarke Date: Wed, 13 May 2015 14:22:04 +0200 Subject: [PATCH] More detailed docs --- README.md | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 064f399..a300f8d 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,32 @@ mkdir -p roles 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 - sudo: yes +hosts: my_host + roles: + - elasticsearch + tasks: + - .... your tasks ... +``` + +or more complex.. + + +``` +--- +hosts: my_host + roles: + - elasticsearch 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: - plugin: elasticsearch-cloud-aws @@ -36,13 +55,11 @@ Then create your playbook yaml adding the role elasticsearch and overriding any version: latest - plugin: elasticsearch-support-diagnostics version: latest - roles: - - elasticsearch 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: