Given tasks like
- command: foo
when: foo_condition
register: foo_result
- changelog: msg="ran foo"
when: foo_result|changed
- command: bar
when: bar_condition
register: bar_result
- changelog: msg="ran bar"
when: bar_result|changed
I want the changelog
action to run
- if both foo_condition and bar_condition were true:
new-changelog-entry "ran foo"
new-changelog-entry -a "ran bar"
- if foo_condition was true and bar_condition was false:
new-changelog-entry "ran foo"
- if foo_condition was false and bar_condition was true:
new-changelog-entry "ran bar"
It should, of course, work with more than just two entries.