I am working on ansible exception handling tasks and stuck in an ansible
tasks execution handling problem where I need your guide to come over.
I have 2 system host group *system_a* and *system_b* and I develop 6 roles
and each role have multiple tasks.I execute 2 roles on *syste_a* and
reaming 4 on *system_b*.
in my case is, if any tasks in a role(1-6) are failed then skip the remains
role execution and execution one task end of the playbook on system_a group
host.
How can handle this case in ansible.
Can you help me in this situation?
here is my site.yml
- host: system_a
roles:
- role-1
- role-2
- hosts: system_b
roles:
- role-3
- role-4
- role-5
- role-6
- tasks:
- name: restart postfix service
service: name=postfix state=restarted
delegate_to: "{{ item }}"
loop: "{{ groups['system_a'] }}"
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/98d1d575-7ccd-4d7f-be9b-bfa48c66d932%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.