Notify after other host after X has happened on Y host.

I was reading through this reddit thread: http://www.reddit.com/r/Python/comments/24a4r0 and found this comment: ‘I found Ansible to be fairly dreadful. It’s difficult to do simple things like “don’t start up the app server until the database schema on another machine has been updated”.’

How would this be done in Ansible? My understanding would be you could:

. Take the application node offline
. Update the database schema
. Update the application server
. Put the application node online

Am I missing something? Is this situation more complex?

Thanks for your thoughts.
NZ

Sounds like that person didn’t get into Ansible very far at all.

  • hosts: databases
    tasks:

  • your update steps here

  • hosts: appservers
    tasks:

  • all the steps here

Ordering in Ansible is intrinsic to the system and there’s nothing complicated here to do at all.

Playbooks contain an ordered list of plays, so you can just address different groups in any order you like, including revisiting previous groups.

Nice reply on Reddit "
Um, that’s as hard as putting the “start app server” command after the “update schema” command.

"

:slight_smile:

I missed the reply on Reddit, but that makes sense to me. Happy to know it is as “radically simple” as I thought it would be.