
Size: a a a
- hosts: localhost
strategy: debug
tasks:
- name: Test that my module works
(debug) p result
{'msg': u"ERROR! 'wrong_var' is undefined", 'failed': True}
(debug) p task.args
{u'data': u'{{ wrong_var }}'}
(debug) task.args['data'] = '{{ var1 }}'
(debug) p task.args
{u'data': '{{ var1 }}'}
(debug) redo
ln -s /etc/passwd myfile
host_key_checking = False
export ANSIBLE_HOST_KEY_CHECKING = False
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no <user>@<ip> <command>
- debug: msg="{{ variable }}"
выведет
"2-6"
- debug: var="{{ variable }}"
"2-6": "-4"
ssh host <command> \; <command>