[ansible-project] Re: When more than one play in a playbook, how to define an order for running one before others

2016-10-24 Thread 'J Hawkesworth' via Ansible Project
Not sure I really understand but you can maybe use pre_task before to set_fact. And you can use multiple when: conditions if you need to. Another way to solve this might be to use role dependencies: http://docs.ansible.com/ansible/playbooks_roles.html#role-dependencies That way you could mak

[ansible-project] Re: When more than one play in a playbook, how to define an order for running one before others

2016-10-24 Thread fanvalt
Thank you but I already use a when condition on the role. But it won't make the 1st play with the 1st role being run first Le lundi 24 octobre 2016 15:06:35 UTC+2, J Hawkesworth a écrit : > > You can use a when: conditional against your role (if you don't mind > seeing lots of 'skipped' steps for

[ansible-project] Re: When more than one play in a playbook, how to define an order for running one before others

2016-10-24 Thread 'J Hawkesworth' via Ansible Project
You can use a when: conditional against your role (if you don't mind seeing lots of 'skipped' steps for each task in the role. see http://docs.ansible.com/ansible/playbooks_conditionals.html#applying-when-to-roles-and-includes Jon On Monday, October 24, 2016 at 11:26:33 AM UTC+1, fanvalt wrote

[ansible-project] Re: When more than one play in a playbook, how to define an order for running one before others

2016-10-24 Thread fanvalt
Would the new directive strategy help if set in the first play? hosts: all strategy: free roles: - { role: tomweb, when: module == 'tomweb' } vars: module: "{{ PARAM[0] }}" would run this play and when done then run other plays, am I correct ? Le mercredi 19 octobre 2016 13:21