On Wed, Nov 05, 2014 at 08:06:41AM -0800, James Morgan wrote:
> 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.