Hi, I'd like to be able to build a variable name programatically in a similar fashion to
http://docs.ansible.com/faq.html#how-do-i-access-a-variable-name-programmatically Instead of accessing a dict I would like to build up the variable name. For example - hosts: localhost connection: local vars: test_app: admin admin_port: 1234 tasks: - debug: msg: "Admin port = {{ test_app + '_port' }}" This outputs TASK: [debug ] **************************************************************** ok: [localhost] => { "msg": "Admin port = admin_port" } I would like to get the value of *admin_port*. So would need to do some kind of double substitution. I need to get the information from a var file just given the app_name. The above is just to demonstrate. Many thanks James -- 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/4e4cb0e3-47d5-4779-9f84-9e41b6b49351%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
