Re: [ansible-project] How to choose the var list based on a condition

2019-05-13 Thread Brian Coca
To decide which var to use: mydict: {{ '01' in app|ternary('App01', 'App02') }} Then you can use via: lookup('vars', mydict) -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop rece

Re: [ansible-project] How to choose the var list based on a condition

2019-05-12 Thread Saranya N
Hi Kai, Im using roles/vars file, so how do I achieve it? App01: A : value1 B : value2 C : value3 App02: A : value4 C : value5 B : value6 And so on... Also passing different values now, when -e app=data01_kerb something like this, if it has 01 , then choose App01's dictionary ' if a

Re: [ansible-project] How to choose the var list based on a condition

2019-05-11 Thread Kai Stian Olstad
On 11.05.2019 20:40, Saranya N wrote: > I have a list of dictionary variables something like below in vars file. > > App01: > A : value1 > B : value2 > C : value3 > > App02: >A : value4 >C : value5 >B : value6 > > And so on... > > When I run my playbook with -e option app=01

[ansible-project] How to choose the var list based on a condition

2019-05-11 Thread Saranya N
I have a list of dictionary variables something like below in vars file. App01: A : value1 B : value2 C : value3 App02: A : value4 C : value5 B : value6 And so on... When I run my playbook with -e option app=01 or app=App01 I want to use App01 variables in with_items in my task . How