I need to create new variable from contents of other variables. Currently I'm using something like this:
- command: echo "{{ var1 }}-{{ var2 }}-{{ var3 }}"
register: newvar
The problem is:
- Usage of
{{ var1 }}...{{ varN }}brings too long strings and very ugly code. - Usage of
{{ newvar.stdout }}a bit better but confusing. - Usage of
set_factmodule caches fact between runs. It isn't appropriate for me.
Is there any other solution?