I need to create new variable from contents of other variables. Currently I\'m using something like this:
- command: echo \"{{ var1 }}-{{ var2 }}-{{ var3 }}\"
As simple as joining lists in python itself.
ansible -m debug -a msg="{{ '-'.join(('list', 'joined', 'together')) }}" localhost
localhost | SUCCESS => { "msg": "list-joined-together" }
Works the same way using variables:
ansible -m debug -a msg="{{ '-'.join((var1, var2, var3)) }}" localhost