I am trying to use the shell module to generate a diff between two remote files, but it is erring out without giving me a warning or error:
`
- name: create diff of old settings file and new settings file
shell: diff /home/deploy/{{ application_name }}/shared/config/settings.yml /home/deploy/{{ application_name }}/shared/config/settings.yml.ansible_old_version >> /home/deploy/{{ application_name }}/shared/config/settings.yml_diffs_1
when: settings_file.changed
`
It executes totally fine when run directly in a shell on the remote machine…
Here is the verbose error output, which doesn’t seem to give much of use:
Thanks for any help or workaround! I’ve spent too much time on this…
`
fatal: [staging]: FAILED! => {“changed”: true, “cmd”: “diff /home/deploy/app_name/shared/config/settings.yml /home/deploy/app_name/shared/config/settings.yml.ansible_old_version > /home/deploy/coverhound/shared/config/settings.yml_diffs/settings.yml_2016-11-30_14:45:54”, “delta”: “0:00:00.002778”, “end”: “2016-11-30 14:45:57.198400”, “failed”: true, “invocation”: {“module_args”: {“_raw_params”: “diff /home/deploy/coverhound/shared/config/settings.yml /home/deploy/app_name/shared/config/settings.yml.ansible_old_version > /home/deploy/app_name/shared/config/settings.yml_diffs/settings.yml_2016-11-30_14:45:54”, “_uses_shell”: true, “chdir”: null, “creates”: null, “executable”: “/bin/bash”, “removes”: null, “warn”: true}, “module_name”: “command”}, “rc”: 1, “start”: “2016-11-30 14:45:57.195622”, “stderr”: “”, “stdout”: “”, “stdout_lines”: , “warnings”: }
`