Skip to content

Instantly share code, notes, and snippets.

@cespare
Created January 15, 2014 15:43
Show Gist options
  • Save cespare/8438518 to your computer and use it in GitHub Desktop.
Save cespare/8438518 to your computer and use it in GitHub Desktop.
Ansible hang
---
- name: rsync set default value for copy_dest
set_fact: copy_dest={{ dest }}
when: copy_dest is not defined
- name: rsync src={{ src }} dest={{ dest }} copy_dest={{ copy_dest }}
local_action: >
rsync --archive --compress --copy-unsafe-links --checksum --itemize-changes --exclude=.git
--exclude=.vagrant --copy-dest={{ copy_dest }} {{ src }} {{ inventory_hostname }}:{{ dest }}
register: rsync
changed_when: rsync.stdout_lines|length > 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment