synchronize

Collection: posix

Full Name: parallax.posix.synchronize

Aliases: ansible.posix.synchronize, synchronize

Controller module — runs on the local controller, not on remote hosts.

Synopsis

Manage synchronize

Parameters

NameTypeRequiredDefaultDescription
srcstringyesPath on the source host that will be synced to the destination
deststringyesPath on the destination host that will be synced from the source
modestringpushSync mode: push copies from controller to remote, pull copies from remote to controller
archivebooltrueMirrors the rsync flag –archive to enable recursive, links, perms, times, owner, group flags
checksumboolfalseSkip based on checksum rather than mod-time and size
compressbooltrueCompress file data during transfer
deleteboolfalseDelete files in dest that do not exist in src
dirsboolfalseTransfer directories without recursing
existing_onlyboolfalseSkip creating new files on the receiver
linksbooltrueCopy symlinks as symlinks
recursivebooltrueRecurse into directories
rsync_opts[]stringAdditional rsync options to pass as a list
rsync_pathstringPath to rsync command on the remote host
rsync_timeoutstring0Timeout for the rsync command in seconds
ssh_argsstringAdditional SSH arguments to pass to rsync
private_keystringPath to the private key file for SSH connections
verify_hostboolfalseVerify host key of the destination machine
set_remote_userbooltruePut user@ for the remote paths
partialboolfalseKeep partially transferred files
copy_linksboolfalseCopy referent of symlinks as files/dirs
timesbooltruePreserve modification times
ownerbooltruePreserve owner
groupbooltruePreserve group
permsbooltruePreserve permissions

Example

- name: Example synchronize task
  synchronize:
    src: <your_src>
    dest: <your_dest>