Hi Folks,
I am trying to create single playbook for every service we have. So here we
need to deploy multiple roles on different service instance.
What I want is that, I want to just define variable in different group vars
files and depending upon that variable, playbook should run the roles like:
if we have service A which has variable like:
roles:
- common
- roleA
and service B has:
roles:
- common
- roleB
now single playbook should run use these variables and depending upon value
it should sun respective roles on respective service instances like:
playbook.yml
....
roles:
- { role : "{{ item }}" }
with_items:
- roles
But it is not working as I want, it give me error:
"*ERROR: with_items is not a legal parameter at this level in an Ansible
Playbook*"
Any Ideas how can I achieve the same using conditions in playbook??
Best Wishes,
Suraj
--
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/2476e5e5-dacc-4783-baa2-4489d346267a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.