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

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

Overview

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

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

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

attr_option, attr_options, attribute, fix_inclusion, #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.



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

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.



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

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.



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

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.



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

attribute :copy_links

#delete:yes, ...

Returns Delete files in C(dest) 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 in C(dest) that don’t exist (after transfer, not before) in the C(src) path. This option requires C(recursive=yes).



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

attribute :delete

#destString

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

Returns:

  • (String)

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



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

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.



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

attribute :dest_port

#dirs:yes, ...

Returns Transfer directories without recursing.

Returns:

  • (:yes, :no, nil)

    Transfer directories without recursing



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

attribute :dirs

#existing_only:yes, ...

Returns Skip creating new files on receiver.

Returns:

  • (:yes, :no, nil)

    Skip creating new files on receiver.



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

attribute :existing_only

#groupSymbol?

Returns Preserve group.

Returns:

  • (Symbol, nil)

    Preserve group



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

attribute :group

Returns add a destination to hard link against during the rsync.

Returns:

  • (String, nil)

    add a destination to hard link against during the rsync.



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

attribute :link_dest

Returns Copy symlinks as symlinks.

Returns:

  • (Symbol, nil)

    Copy symlinks as symlinks.



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

attribute :links

#mode:pull, ...

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:

  • (:pull, :push, 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.



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

attribute :mode

#ownerSymbol?

Returns Preserve owner (super user only).

Returns:

  • (Symbol, nil)

    Preserve owner (super user only)



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

attribute :owner

#partial:yes, ...

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

Returns:

  • (:yes, :no, nil)

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



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

attribute :partial

#permsSymbol?

Returns Preserve permissions.

Returns:

  • (Symbol, nil)

    Preserve permissions.



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

attribute :perms

#private_keyObject?

Returns Specify the private key to use for SSH-based rsync connections (e.g. C(~/.ssh/id_rsa)).

Returns:

  • (Object, nil)

    Specify the private key to use for SSH-based rsync connections (e.g. C(~/.ssh/id_rsa))



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

attribute :private_key

#recursiveSymbol?

Returns Recurse into directories.

Returns:

  • (Symbol, nil)

    Recurse into directories.



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

attribute :recursive

#rsync_optsArray<String>, ...

Returns Specify additional rsync options by passing in an array.

Returns:

  • (Array<String>, String, nil)

    Specify additional rsync options by passing in an array.



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

attribute :rsync_opts

#rsync_pathString?

Returns Specify the rsync command to run on the remote host. See C(–rsync-path) on the rsync man page.,To specify the rsync command to run on the local host, you need to set this your task var C(ansible_rsync_path).

Returns:

  • (String, nil)

    Specify the rsync command to run on the remote host. See C(–rsync-path) on the rsync man page.,To specify the rsync command to run on the local host, you need to set this your task var C(ansible_rsync_path).



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

attribute :rsync_path

#rsync_timeoutInteger?

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

Returns:

  • (Integer, nil)

    Specify a C(–timeout) for the rsync command in seconds.



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

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”.



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

attribute :set_remote_user

#srcString

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

Returns:

  • (String)

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



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

attribute :src

#timesSymbol?

Returns Preserve modification times.

Returns:

  • (Symbol, nil)

    Preserve modification times



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

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



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

attribute :use_ssh_args

#verify_host:yes, ...

Returns Verify destination host key.

Returns:

  • (:yes, :no, nil)

    Verify destination host key.



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

attribute :verify_host