last modified files only moved ansible? -


my requirement moving files remote host using ansible playbook.

my ansible script

--- - hosts: webservers   remote_user: root   tasks:      - copy: src=/home/bu/bilal/site dest=/tmp owner=root group=root mode=777 

when run playbook has moved file remote.

when have ran playbook again overwrite whole folder again. looking, files have modified files overwrite because folder size large taking time single file change.

take @ synchronize module:

uses rsync make synchronizing file paths in playbooks quick , easy.

example:

- name: sync files   synchronize:     src: "{{ conf.dev_path }}/"     dest: "{{ conf.host_path }}"     delete: yes     rsync_opts:       - "--exclude=.*" 

Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -