Class: Ansible::Ruby::Modules::Synchronize

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/core/files/synchronize.rb

Overview

C(synchronize) is a wrapper around the rsync command, meant to make common tasks with rsync easier. It is run and originates on the local host where Ansible is being run. Of course, you could just use the command action to call rsync yourself, but you also have to add a fair number of boilerplate options and host facts. You ‘still` may need to call rsync directly via C(command) or C(shell) depending on your use case. C(synchronize) does not provide access to the full power of rsync, but does make most invocations easier to follow.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, #initialize, remove_existing_validations, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#archive:yes, ...

Returns Mirrors the rsync archive flag, enables recursive, links, perms, times, owner, group flags and -D.

Returns:

  • (:yes, :no, nil)

    Mirrors the rsync archive flag, enables recursive, links, perms, times, owner, group flags and -D.



27
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 27

attribute :archive

#checksum:yes, ...

Returns Skip based on checksum, rather than mod-time & size; Note that that “archive” option is still enabled by default - the “checksum” option will not disable it.

Returns:

  • (:yes, :no, nil)

    Skip based on checksum, rather than mod-time & size; Note that that “archive” option is still enabled by default - the “checksum” option will not disable it.



31
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 31

attribute :checksum

#compress:yes, ...

Returns Compress file data during the transfer. In most cases, leave this enabled unless it causes problems.

Returns:

  • (:yes, :no, nil)

    Compress file data during the transfer. In most cases, leave this enabled unless it causes problems.



35
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 35

attribute :compress

Returns Copy symlinks as the item that they point to (the referent) is copied, rather than the symlink.

Returns:

  • (:yes, :no, nil)

    Copy symlinks as the item that they point to (the referent) is copied, rather than the symlink.



59
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 59

attribute :copy_links

#delete:yes, ...

Returns Delete files that don’t exist (after transfer, not before) in the C(src) path. This option requires C(recursive=yes).

Returns:

  • (:yes, :no, nil)

    Delete files that don’t exist (after transfer, not before) in the C(src) path. This option requires C(recursive=yes).



43
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 43

attribute :delete

#destObject

Returns Path on the destination host that will be synchronized from the source; The path can be absolute or relative.

Returns:

  • (Object)

    Path on the destination host that will be synchronized from the source; The path can be absolute or relative.



15
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 15

attribute :dest

#dest_portArray<String>, ...

Returns Port number for ssh on the destination host. Prior to ansible 2.0, the ansible_ssh_port inventory var took precedence over this value.

Returns:

  • (Array<String>, String, nil)

    Port number for ssh on the destination host. Prior to ansible 2.0, the ansible_ssh_port inventory var took precedence over this value.



19
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 19

attribute :dest_port

#dirs:yes, ...

Returns Transfer directories without recursing.

Returns:

  • (:yes, :no, nil)

    Transfer directories without recursing



47
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 47

attribute :dirs

#existing_only:yes, ...

Returns Skip creating new files on receiver.

Returns:

  • (:yes, :no, nil)

    Skip creating new files on receiver.



39
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 39

attribute :existing_only

#group:yes, ...

Returns Preserve group.

Returns:

  • (:yes, :no, nil)

    Preserve group



75
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 75

attribute :group

Returns Copy symlinks as symlinks.

Returns:

  • (:yes, :no, nil)

    Copy symlinks as symlinks.



55
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 55

attribute :links

#mode:push, ...

Returns Specify the direction of the synchronization. In push mode the localhost or delegate is the source; In pull mode the remote host in context is the source.

Returns:

  • (:push, :pull, nil)

    Specify the direction of the synchronization. In push mode the localhost or delegate is the source; In pull mode the remote host in context is the source.



23
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 23

attribute :mode

#owner:yes, ...

Returns Preserve owner (super user only).

Returns:

  • (:yes, :no, nil)

    Preserve owner (super user only)



71
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 71

attribute :owner

#partialBoolean?

Returns Tells rsync to keep the partial file which should make a subsequent transfer of the rest of the file much faster.

Returns:

  • (Boolean, nil)

    Tells rsync to keep the partial file which should make a subsequent transfer of the rest of the file much faster.



97
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 97

attribute :partial

#perms:yes, ...

Returns Preserve permissions.

Returns:

  • (:yes, :no, nil)

    Preserve permissions.



63
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 63

attribute :perms

#recursive:yes, ...

Returns Recurse into directories.

Returns:

  • (:yes, :no, nil)

    Recurse into directories.



51
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 51

attribute :recursive

#rsync_optsObject?

Returns Specify additional rsync options by passing in an array.

Returns:

  • (Object, nil)

    Specify additional rsync options by passing in an array.



94
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 94

attribute :rsync_opts

#rsync_pathObject?

Returns Specify the rsync command to run on the remote host. See C(–rsync-path) on the rsync man page.

Returns:

  • (Object, nil)

    Specify the rsync command to run on the remote host. See C(–rsync-path) on the rsync man page.



79
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 79

attribute :rsync_path

#rsync_timeoutInteger?

Returns Specify a –timeout for the rsync command in seconds.

Returns:

  • (Integer, nil)

    Specify a –timeout for the rsync command in seconds.



82
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 82

attribute :rsync_timeout

#set_remote_userBoolean?

Returns put user@ for the remote paths. If you have a custom ssh config to define the remote user for a host that does not match the inventory user, you should set this parameter to “no”.

Returns:

  • (Boolean, nil)

    put user@ for the remote paths. If you have a custom ssh config to define the remote user for a host that does not match the inventory user, you should set this parameter to “no”.



86
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 86

attribute :set_remote_user

#srcObject

Returns Path on the source host that will be synchronized to the destination; The path can be absolute or relative.

Returns:

  • (Object)

    Path on the source host that will be synchronized to the destination; The path can be absolute or relative.



11
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 11

attribute :src

#times:yes, ...

Returns Preserve modification times.

Returns:

  • (:yes, :no, nil)

    Preserve modification times



67
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 67

attribute :times

#use_ssh_args:yes, ...

Returns Use the ssh_args specified in ansible.cfg.

Returns:

  • (:yes, :no, nil)

    Use the ssh_args specified in ansible.cfg



90
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 90

attribute :use_ssh_args

#verify_hostBoolean?

Returns Verify destination host key.

Returns:

  • (Boolean, nil)

    Verify destination host key.



101
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 101

attribute :verify_host