I've a role pkg_install
, is there any way based on status of the role execution can we execute post_tasks? also ignore errors if role pkg_install failed?
- name: status file
hosts: localhost
gather_facts: false
roles:
- role: "pkg_install"
register: status
ignore_errors: true
post_tasks
- name: status DEBUG
debug:
msg: "pkg_install success"
when: status is successful