Re: [ansible-project] Calling a dictionary based on an existing variable

2017-02-20 Thread Nicholas Santiago
Hi, Marko -- How about having three files in vars directory (eg. pvs_vars.yml, > stage_vars.yml, prod_vars.yml) with the same variable in it (ldapserver) > and using include_vars module this way: > - include_vars: "{{ env }}_vars.yml" > That sounds like a considerably easier and more sane

Re: [ansible-project] Calling a dictionary based on an existing variable

2017-02-17 Thread Stankovic, Marko
Hi, How about having three files in vars directory (eg. pvs_vars.yml, stage_vars.yml, prod_vars.yml) with the same variable in it (ldapserver) and using include_vars module this way: - include_vars: "{{ env }}_vars.yml" More info: http://docs.ansible.com/ansible/include_vars_module.html

[ansible-project] Calling a dictionary based on an existing variable

2017-02-14 Thread Nicholas Santiago
I have a playbook (ldapconfig.yml) with a variables file (ldapconfig_vars.yml), and am hoping to use an inventory var to specify which dictionary of the below to call. So, if env=PVS, it calls the ldapserver_pvs dictionary, if env=PROD, it calls the ldapserver_prod dict, and so on.