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

21 views
Skip to first unread message

nZac

unread,
May 2, 2014, 3:00:15 PM5/2/14
to ansible...@googlegroups.com
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

Michael DeHaan

unread,
May 2, 2014, 3:17:31 PM5/2/14
to ansible...@googlegroups.com
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.






--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/98c44a41-e462-4b0c-8336-4cf854a5d09f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael DeHaan

unread,
May 2, 2014, 3:18:05 PM5/2/14
to ansible...@googlegroups.com
Nice reply on Reddit "
Um, that's as hard as putting the "start app server" command after the "update schema" command.
"

:)


nZac

unread,
May 2, 2014, 3:56:39 PM5/2/14
to ansible...@googlegroups.com
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.
Reply all
Reply to author
Forward
0 new messages