Last active
June 15, 2016 03:41
-
-
Save maxim/7dd6e4d98d8c7d1f4961 to your computer and use it in GitHub Desktop.
Copy file on remote machine in ansible
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: ensure file exists at path | |
shell: rsync -ci /source/path /destination/path | |
register: rsync_result | |
changed_when: "rsync_result.stdout != ''" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
changed_when: 'rsync_result.stdout != ""'
Avoid unneeded backslashes