How to pass variables to task

15 views
Skip to first unread message

KP

unread,
Oct 27, 2017, 9:06:28 AM10/27/17
to Ansible Project
Hi,
Is there a way to pass multiple variables to a task? All the variables will be defined in inventory file:

For example:
My inventory file 1 will be having variables like below:
is_xyz=true
is_abc=false
is_sdf=true
...
...

My inventory file 2 will be having variables like below:
is_xyz=true
is_mnp=true
is_sdf=false
...
...

I want to use one playbook for multiple inventory files and I dont want to change the variable names every time in playbook. I want to know if there is a way to pass variables like {{ is_* }} (i mean with wildcard)

Thanks

Reply all
Reply to author
Forward
0 new messages