Hi,

I have problem with the lookup module, I am given the file name as a 
variable, it takes it but didn't replace the variable with it's value. For 
example:

pub_subnet: "{{ lookup('file', './vars/{{ vpc_name }}_public_subnet.yml') 
}}"

When I run the playbook, it should replace it with the variable name: 
tendo_public_subnet.yml

But it is giving me an error of:

TASK: [VPC | set the facts] 
***************************************************
fatal: [localhost] => could not locate file in lookup: ./vars/{{ vpc_name 
}}_public_subnet.yml

FATAL: all hosts have already failed -- aborting

Can somebody point me that where I am making a mistake. 

Thanks



-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2c5d050a-39f3-4c5d-b3cd-00da58b5ccab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to