Hi Ladies/Gents,

I am getting an error message when running a win_template task, any 
assistance would be appreciated.

The problem only appears to happen with variables that are being "created" 
within the task, in this example "this_task_var1" is used below, variables 
that have been populated outside the task appear to be fine.

This variable is being used to populate part of a file,* the output in the 
file is correct, but there is an error being reported.*

Cheers,


*Error:*
failed: [WIN-2016AAA.dom.co.nz] (item=main) => {"*ansible_loop_var*": 
"item", "changed": false, "item": "main", "msg": "*AnsibleUndefinedVariable*: 
'this_task_var1' is *undefined*"}


*Task*


- name: test1
block:
- name: create config file 
win_template:
src: "{{src_path_var}}"
dest: "{{dest_pat_var}}" 
force: yes 
vars:
this_task_var1: "my var value"

with_items: "{{pipeline_folder_names}}"




*Template file*

{{this_task_var1}}


-- 
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/03333ffd-8036-4a23-a096-d5feb6312d85%40googlegroups.com.

Reply via email to