Verification of changes

Hi,

I’m looking at a project where changes have to be rolled out to a number of hosts, tested and if something is wrong - the previous configuration is restored. The trick is that testing can only happen after the change has been rolled out to all machines (as they provide a single service). I’m trying to get this into a single playbook, but I’m not sure how to approach this. The testing has to be done from another machine, and if it fails - all the affected machines must be changed, so the flow of changes looks like this:

  • change:
    machine A
    machine B
    machine C
  • run tests using machine D (a few different tests)
  • finish if all good
  • if failed roll back
    machine A
    machine B
    machine C
  • run tests using machine D (to confirm rollback worked)

Any suggestions on the approach here? A single playbook with multiple plays in it?

Thx,

kind regards
Pshem