Is it possible to double template the vars?
vars:
versions_appA: '1.2.3.4'
versions_appB: '4.3.2.1'
in tasks (for jinja template):
the ideal would be (this is fake):
- set_fact:
choosen_app: 'appA'
choosen_app_version: "{{ versions_{{ choosen_app }} }}"
Expected result
choosen_app_version: '1.2.3.4'
I can get as close as:
- set_fact:
choosen_app_version_tmp: "versions_{{ choosen_app | default() }}"
- set_fact:
choosen_app_version: "{{ choosen_app_version_tmp }}"
that evaluates to
choosen_app_version: versions_appA
(I need version number - not a name of the variable)