How to maintein particula order via host groups and/or playbook

21 views
Skip to first unread message

tiny...@gmail.com

unread,
Oct 23, 2016, 2:27:26 PM10/23/16
to Ansible Project
Hello,

I dont know how to implement group ordering in the right way.
Example:
Start or Stop application with database.
When starting: i need to start DB first, then APP itself
When stopping: i need to do reverse order

Right now i'm using groups inside inventory file, so it's easy to say that host is doing (groups are used like labels).
And playbook has strict rules about what hosts it takes (like: -hosts: db).
But i'm look to appropriate way to create high level playbook so it generick for start/stop/status tasks.

May be i'm trying to do things 'from behind', so please help me understand possible ways to handle that.

Thank you in advance.
Reply all
Reply to author
Forward
0 new messages