diff --git a/tasks/inner.yml b/tasks/inner.yml index 408d61e..0fdd917 100644 --- a/tasks/inner.yml +++ b/tasks/inner.yml @@ -29,9 +29,10 @@ src: '{{ item.src | default(omit) }}' unsafe_writes: '{{ item.unsafe_writes | default(omit) }}' validate: '{{ item.validate | default(omit) }}' + register: simplefile_write_file - name: Execute post-command command: '{{ item.post_command }}' - when: item.post_command is defined + when: item.post_command is defined and simplefile_write_file.changed ...