Hello,

in my inventory file, I will use aliases to deploy differents applications 
for the same user:

[reference]
refweb1 PARAM="['tomweb','7.30.05005.1334','1']"
refqry1 PARAM="['query','7.30.05005.1334','1']"
refweb2 PARAM="['restart','1']"

I need to deploy the query applicatio before yje tomweb application, so in 
my playbook I wrote 2 plays:
the one I want to play first will run the role this way:
   roles:
    - { role: tomweb, when:  module == 'tomweb' }
   vars:
    module: "{{ PARAM[0] }}"

the play I want to run after the 1st one is then defined later with this 
rĂ´le:
   roles:
    - { role: query, when:  module == 'query' }
   vars:
    module: "{{ PARAM[0] }}"

The last play will be like:
   roles:
    - { role: restart, when:  module == 'restart' }
   vars:
    module: "{{ PARAM[0] }}"

This way to proceed do work but I have to duplicate all pre_tasks and 
variables, is there a way to say I want to run for sure the tomweb role 
first if the line with this module is present in the inventory file ?
And so have only one play in my playbook ?

regards

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/46f8a235-936a-412e-912e-ff8547680ad5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to