Good afternoon Group. Any help is appreciated.
I have a survey that collects the name of a project (project_name). Lets
call it SKILL
I have variables set in the playbook for all the projects to save their
USER and Password Info.
- SKILL_UNAME
- SKILL_PWORD
I have a task that has to account for the project name and pull the values
from those variables to set a temp variable in the task. Unfortunately, I
keep getting an error when attempting to do a lookup and get the value of
the variable:
set_fact:
temp_uname: "{{ lookup('vars', project_name + '_UNAME' }}"
temp_pword: "{{ lookup('vars', project_name + '_PWORD' }}"
Error reads: template error while templating string: unexpected '}',
expected ')'. String: {{ lookup('vars', project_name + '_UNAME' }}"
Any help is appreciated!
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/1a99e752-6d8b-4c9e-855b-e55a28bc499dn%40googlegroups.com.