On 01.03.2019 15:32, Jeffrey Agnitsch wrote:
>
>>
>> Yeah that worked for a debugging scenario so awesome and thanks for that.
>> Might you have any idea how to use those called variables to edit text
>> files? Namely here is the bigger playbook I am trying within the proxy
>> role. I am trying to have it change the name of the .conf file as well as
>> manipulate text within the prod_proxy_conf.j2. It keeps stating that there
>> is an undefined variable however any thoughts?
Without the actual output it's impossible to help.
> proxy role main.yml
> - name: " Proxy | Setup Proxy"
> template:
> src: /etc/ansible/files/proxy_files/prod_proxy_conf.j2
> dest: /etc/httpd/conf.d/ "{{ hostvars[item]['client_name'] }}".conf
You can't use double quotes in dest, unless you filename actually contains
quotes.
dest: /etc/httpd/conf.d/{{ hostvars[item]['client_name'] }}.conf
--
Kai Stian Olstad
--
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/a79aefc4-c3d5-6e95-b8e1-f220c69d0d2f%40olstad.com.
For more options, visit https://groups.google.com/d/optout.