From 4b8238af14279dbc674f86c0ed6178ad36f6071a Mon Sep 17 00:00:00 2001 From: Jedrzej Nowak Date: Mon, 1 Feb 2016 14:56:59 +0100 Subject: [PATCH] Removed deprecated ansible handler documentation Change-Id: Id2aef366111ae4410763c3f6b78c6cc4e1f47fa0 Related-to: #1540383 --- doc/source/handler_ansible.rst | 50 ---------------------------------- doc/source/index.rst | 1 - 2 files changed, 51 deletions(-) delete mode 100644 doc/source/handler_ansible.rst diff --git a/doc/source/handler_ansible.rst b/doc/source/handler_ansible.rst deleted file mode 100644 index 9c62c2c7..00000000 --- a/doc/source/handler_ansible.rst +++ /dev/null @@ -1,50 +0,0 @@ -.. _handler_ansible_details: - -Ansible Handler -=============== - -Let's look into simple ``hosts_file/actions/run.yaml`` example :: - - - hosts: [{{host}}] - sudo: yes - tasks: - {% for val in hosts %} - - name: Create hosts entries for {{val['name']}} => {{val['ip']}} - lineinfile: - dest: /etc/hosts - regexp: ".*{{val['name']}}$" - line: "{{val['ip']}} {{val['name']}}" - state: present - {% endfor %} - -It's pretty much standard ansible playbook, but it is processed with jinja2 -before ansible is executed. - -Solar will create proper inventory :: - - localhost ansible_connection=local user=vagrant location_id="d6255f99dda2fca55177ffad96f390a9" transports_id="2db90247d5d94732448ebc5fdcc9f80d" hosts="[{'ip': u'10.0.0.4', 'name': u'node1'}, {'ip': u'10.0.0.3', 'name': u'node0'}]" - -Playbook will be also created :: - - - hosts: [localhost] - sudo: yes - tasks: - - - name: Create hosts entries for node1 => 10.0.0.4 - lineinfile: - dest: /etc/hosts - regexp: ".*node1$" - line: "10.0.0.4 node1" - state: present - - - name: Create hosts entries for node0 => 10.0.0.3 - lineinfile: - dest: /etc/hosts - regexp: ".*node0$" - line: "10.0.0.3 node0" - state: present - -You may wonder about ``hosts: [{{host}}]``, we have our own -:ref:`res-transports-term` so we execute ansible like this :: - - ansible-playbook --module-path /tmp/library -i /tmp/tmpkV0U5F/tmpGmLGEwhosts_file2/inventory /tmp/tmpkV0U5F/tmpGmLGEwhosts_file2/runlNjnI3 diff --git a/doc/source/index.rst b/doc/source/index.rst index 8c0dc161..ee45e15e 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -20,7 +20,6 @@ Contents: resource_repository orchestration transports - handler_ansible examples deployment_plan faq