Я пытаюсь распечатать XML переменной в Ansible. Например,
- name: "Convert host_var to OpenConfig Yang XML"
command: "python ../scripts/convert.py -y ./host_vars/{{inventory_hostname}}.yml"
delegate_to: localhost
register: yang_xml
- name: "Display generated OpenConfig Yang XML"
xml:
xmlstring: '{{ yang_xml.stdout }}'
pretty_print : yes
Однако я получаю ... не уверен, почему он пытается создать соединение. Есть идеи?
[WARNING]: sftp transfer mechanism failed on [172.29.133.2]. Use ANSIBLE_DEBUG=1 to see detailed information
[WARNING]: scp transfer mechanism failed on [172.29.133.2]. Use ANSIBLE_DEBUG=1 to see detailed information
fatal: [qfx1]: FAILED! => {"changed": false, "module_stderr": "Shared connection to 172.29.133.2 closed.\r\n", "module_stdout": "\r\nerror: unknown command: /bin/sh\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 0}