1
Would anyone know how to create an Ansible playbook to run the following actions in the right order?
- Stop Tomcat on the application servers
- Update the database on the database server
- Update the webapps on the application servers
- Restart Tomcat on the application servers
I'm able to run these actions either in the right sequence or on the right servers. I'm struggling to order actions and get them to run on the right server in a single play. Any pointer to an answer would be much appreciated!
1Can you show what you have? Are you specifying different hosts for different tasks? Are you using pre_task/post_task? – Mxx – 2014-11-28T05:27:48.950
1I'd say that if you have these actions in sequence in a single playbook then they will always be run in the right order on each server; please enhance your question to show your config and what's going wrong. – wurtel – 2014-11-28T11:59:14.807
I didn't realise I could write several plays per playbook. Problem solved as far as I'm concerned. Apologies for the unclear question and thanks for the comments. – marcv81 – 2014-11-28T12:44:27.737