Created
July 9, 2020 13:55
-
-
Save tsuchm/4d7ee0b01a082902a60cce4e3b8e3429 to your computer and use it in GitHub Desktop.
Sample Ansible playbook of finalize task which is invoked when a task occurs a modification
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: first task | |
register: current_task | |
- set_fact: | |
taskset_changed: "{{ current_task.changed }}" | |
- name: second task | |
register: current_task | |
- set_fact: | |
taskset_changed: "{{ taskset_changed or current_task.changed }}" | |
- name: finalize task | |
when: taskset_changed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment