In the specific case of modifying one file only, multiple times, you could get away with one register for the original modification timestamp, and then compare that timestamp with the current timestamp as your last operation. In the general case, I think you need to use a register with a boolean for each operation that can trigger your final action.
On Monday, 12 December 2016 19:06:18 UTC, John Oliver wrote: > > Let's say I have a playbook that looks for and changes lines in > sshd_config if necessary. Then I want the sshd service to be restarted > only if at least one of those actions has taken place. Is there a way to > evaluate for that without registering a variable for the completion of each > and every play? > -- 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/be98237b-5ea8-4b2e-a335-32d18f261c71%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
