Class: Ansible::Ruby::Modules::Synchronize
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Synchronize
- 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
-
#archive ⇒ :yes, ...
Mirrors the rsync archive flag, enables recursive, links, perms, times, owner, group flags and -D.
-
#checksum ⇒ :yes, ...
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.
-
#compress ⇒ :yes, ...
Compress file data during the transfer.
-
#copy_links ⇒ :yes, ...
Copy symlinks as the item that they point to (the referent) is copied, rather than the symlink.
-
#delete ⇒ :yes, ...
Delete files that don’t exist (after transfer, not before) in the C(src) path.
-
#dest ⇒ Object
Path on the destination host that will be synchronized from the source; The path can be absolute or relative.
-
#dest_port ⇒ Array<String>, ...
Port number for ssh on the destination host.
-
#dirs ⇒ :yes, ...
Transfer directories without recursing.
-
#existing_only ⇒ :yes, ...
Skip creating new files on receiver.
-
#group ⇒ :yes, ...
Preserve group.
-
#links ⇒ :yes, ...
Copy symlinks as symlinks.
-
#mode ⇒ :push, ...
Specify the direction of the synchronization.
-
#owner ⇒ :yes, ...
Preserve owner (super user only).
-
#partial ⇒ Boolean?
Tells rsync to keep the partial file which should make a subsequent transfer of the rest of the file much faster.
-
#perms ⇒ :yes, ...
Preserve permissions.
-
#recursive ⇒ :yes, ...
Recurse into directories.
-
#rsync_opts ⇒ Object?
Specify additional rsync options by passing in an array.
-
#rsync_path ⇒ Object?
Specify the rsync command to run on the remote host.
-
#rsync_timeout ⇒ Integer?
Specify a –timeout for the rsync command in seconds.
-
#set_remote_user ⇒ Boolean?
Put user@ for the remote paths.
-
#src ⇒ Object
Path on the source host that will be synchronized to the destination; The path can be absolute or relative.
-
#times ⇒ :yes, ...
Preserve modification times.
-
#use_ssh_args ⇒ :yes, ...
Use the ssh_args specified in ansible.cfg.
-
#verify_host ⇒ Boolean?
Verify destination host key.
Methods inherited from Base
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.
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.
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.
35 |
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 35 attribute :compress |
#copy_links ⇒ :yes, ...
Returns 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).
43 |
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 43 attribute :delete |
#dest ⇒ Object
Returns 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_port ⇒ Array<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.
19 |
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 19 attribute :dest_port |
#dirs ⇒ :yes, ...
Returns 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.
39 |
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 39 attribute :existing_only |
#group ⇒ :yes, ...
Returns Preserve group.
75 |
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 75 attribute :group |
#links ⇒ :yes, ...
Returns 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.
23 |
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 23 attribute :mode |
#owner ⇒ :yes, ...
Returns Preserve owner (super user only).
71 |
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 71 attribute :owner |
#partial ⇒ Boolean?
Returns 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.
63 |
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 63 attribute :perms |
#recursive ⇒ :yes, ...
Returns Recurse into directories.
51 |
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 51 attribute :recursive |
#rsync_opts ⇒ Object?
Returns 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_path ⇒ Object?
Returns 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_timeout ⇒ Integer?
Returns 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_user ⇒ Boolean?
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”.
86 |
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 86 attribute :set_remote_user |
#src ⇒ Object
Returns 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.
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.
90 |
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 90 attribute :use_ssh_args |
#verify_host ⇒ Boolean?
Returns Verify destination host key.
101 |
# File 'lib/ansible/ruby/modules/generated/core/files/synchronize.rb', line 101 attribute :verify_host |