- hosts: webservers roles: - common - { role: foo_app_instance, dir: '/opt/a', app_port: 5000 } - { role: foo_app_instance, dir: '/opt/b', app_port: 5001 }
Thursday, September 22, 2016
Ansible : parameterize roles by adding variables
http://docs.ansible.com/ansible/playbooks_roles.html
Wednesday, September 21, 2016
Ansible : reboot a server and wait for it to come back
https://support.ansible.com/hc/en-us/articles/201958037-Reboot-a-server-and-wait-for-it-to-come-back
- name: restart machine shell: sleep 2 && shutdown -r now "Ansible updates triggered" async: 1 poll: 0 ignore_errors: true - name: waiting for server to come back local_action: wait_for host={{ inventory_hostname }} port=22 delay=30 timeout=300
Subscribe to:
Posts (Atom)