I have a j2 file that i want to edit and copy to my remote server (as apart of my ansible play). The file has several 3 variables indicated by braces {{ }}
. How can I only target the 2nd variable named {{ bar }}
and ignore the other 2 in the file so they're left alone and copied to my remote server? For example, my test.j2 file contains:
line 1 {{ foo }}
line 2 {{ bar }}
line 3 {{ foo2 }}
Can I explicitly address {{ bar }}
variable in my ansible playbook? If so, how would i write it (syntactically) in my ansible playbook?