On 02/19/2014 10:11 AM, Serge van Ginderachter wrote:
On 19 February 2014 15:03, Khuong Dinh Pham <khuon...@gmail.com <mailto:khuon...@gmail.com>> wrote: Vars: environements: ["trunk", "dev01"] my_trunk_port: 8080 my_dev01_port: 8180 Template: {{ my_{{ env }}_port }} try something like this: {{ hostvars[inventory_hostname][ "my_" + env + "_port"] }}
Hmm, much better than my convoluted example. -- 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. For more options, visit https://groups.google.com/groups/opt_out.