Trying to use the api to copy a file and I’d like a diff of the changes.
I’m trying :
results = ansible.runner.Runner(pattern=argument[‘’] ,check=True,diff=True,module_name=‘copy’, module_args=‘src=/tmp/x.txt dest=/tmp/’,).run()
results are:
{‘contacted’: {‘rexpap2’: {‘changed’: True,
‘invocation’: {‘module_args’: ‘src=/tmp/x.txt dest=/tmp/’,
‘module_name’: ‘copy’}}},
running on centos 7 / python 2.7 ansible version 1.7.1
Am passing the right stuff to Runner to get the diff? I went fishing through the source to come up with the syntax I’m using but not really sure it is correct or if I can even get diffs back from the api.
Thanks,