Intento imprimir la mosh_version
variable previamente registrada usando el debug msg
comando ansible como este:
- name: Print mosh version
debug: msg="Mosh Version: {{ mosh_version.stdout }}"
No funciona e imprime el siguiente error:
Note: The error may actually appear before this position: line 55, column 27
- name: Print mosh version
debug: msg="Mosh Version: {{ mosh_version.stdout }}"
^
We could be wrong, but this one looks like it might be an issue with
missing quotes. Always quote template expression brackets when they
start a value. For instance:
with_items:
- {{ foo }}
Should be written as:
with_items:
- "{{ foo }}"
Lo intenté
- name: Print mosh version
debug: msg=Mosh Version: "{{ mosh_version.stdout }}"
pero esto solo imprimirá "Mosh".
¿Cuál es la mejor manera de hacer que esto funcione?
TASK: [ Print mosh version] ************************************** ok: [127.0.0.1] => { "msg": "Mosh" }