Class: Ansible::Ruby::Modules::Synchronize
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Synchronize
- 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
-
#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 in C(dest) that don’t exist (after transfer, not before) in the C(src) path.
-
#dest ⇒ String
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 ⇒ Symbol?
Preserve group.
-
#link_dest ⇒ String?
Add a destination to hard link against during the rsync.
-
#links ⇒ Symbol?
Copy symlinks as symlinks.
-
#mode ⇒ :pull, ...
Specify the direction of the synchronization.
-
#owner ⇒ Symbol?
Preserve owner (super user only).
-
#partial ⇒ :yes, ...
Tells rsync to keep the partial file which should make a subsequent transfer of the rest of the file much faster.
-
#perms ⇒ Symbol?
Preserve permissions.
-
#private_key ⇒ Object?
Specify the private key to use for SSH-based rsync connections (e.g. C(~/.ssh/id_rsa)).
-
#recursive ⇒ Symbol?
Recurse into directories.
-
#rsync_opts ⇒ Array<String>, ...
Specify additional rsync options by passing in an array.
-
#rsync_path ⇒ String?
Specify the rsync command to run on the remote host.
-
#rsync_timeout ⇒ Integer?
Specify a C(–timeout) for the rsync command in seconds.
-
#set_remote_user ⇒ Boolean?
Put user@ for the remote paths.
-
#src ⇒ String
Path on the source host that will be synchronized to the destination; The path can be absolute or relative.
-
#times ⇒ Symbol?
Preserve modification times.
-
#use_ssh_args ⇒ :yes, ...
Use the ssh_args specified in ansible.cfg.
-
#verify_host ⇒ :yes, ...
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, ...
28 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 28 attribute :archive |
#checksum ⇒ :yes, ...
32 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 32 attribute :checksum |
#compress ⇒ :yes, ...
36 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 36 attribute :compress |
#copy_links ⇒ :yes, ...
60 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 60 attribute :copy_links |
#delete ⇒ :yes, ...
44 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 44 attribute :delete |
#dest ⇒ String
16 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 16 attribute :dest |
#dest_port ⇒ Array<String>, ...
20 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 20 attribute :dest_port |
#dirs ⇒ :yes, ...
48 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 48 attribute :dirs |
#existing_only ⇒ :yes, ...
40 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 40 attribute :existing_only |
#group ⇒ Symbol?
76 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 76 attribute :group |
#link_dest ⇒ String?
111 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 111 attribute :link_dest |
#links ⇒ Symbol?
56 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 56 attribute :links |
#mode ⇒ :pull, ...
24 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 24 attribute :mode |
#owner ⇒ Symbol?
72 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 72 attribute :owner |
#partial ⇒ :yes, ...
100 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 100 attribute :partial |
#perms ⇒ Symbol?
64 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 64 attribute :perms |
#private_key ⇒ Object?
108 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 108 attribute :private_key |
#recursive ⇒ Symbol?
52 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 52 attribute :recursive |
#rsync_opts ⇒ Array<String>, ...
96 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 96 attribute :rsync_opts |
#rsync_path ⇒ String?
80 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 80 attribute :rsync_path |
#rsync_timeout ⇒ Integer?
84 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 84 attribute :rsync_timeout |
#set_remote_user ⇒ Boolean?
88 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 88 attribute :set_remote_user |
#src ⇒ String
12 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 12 attribute :src |
#times ⇒ Symbol?
68 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 68 attribute :times |
#use_ssh_args ⇒ :yes, ...
92 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 92 attribute :use_ssh_args |
#verify_host ⇒ :yes, ...
104 |
# File 'lib/ansible/ruby/modules/generated/files/synchronize.rb', line 104 attribute :verify_host |