Class: Ansible::Ruby::Modules::S3_sync

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/cloud/amazon/s3_sync.rb

Overview

The S3 module is great, but it is very slow for a large volume of files- even a dozen will be noticeable. In addition to speed, it handles globbing, inclusions/exclusions, mime types, expiration mapping, recursion, cache control and smart directory mapping.

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

#bucketString

Returns Bucket name.

Returns:

  • (String)

    Bucket name.



20
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/s3_sync.rb', line 20

attribute :bucket

#cache_controlArray<String>, ...

Returns This is a string.,Cache-Control header set on uploaded objects.,Directives are separated by commmas.

Returns:

  • (Array<String>, String, nil)

    This is a string.,Cache-Control header set on uploaded objects.,Directives are separated by commmas.



48
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/s3_sync.rb', line 48

attribute :cache_control

#deleteBoolean?

Returns Remove remote files that exist in bucket but are not present in the file root.

Returns:

  • (Boolean, nil)

    Remove remote files that exist in bucket but are not present in the file root.



52
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/s3_sync.rb', line 52

attribute :delete

#excludeString?

Returns Shell pattern-style file matching.,Used after include to remove files (for instance, skip “*.txt”),For multiple patterns, comma-separate them.

Returns:

  • (String, nil)

    Shell pattern-style file matching.,Used after include to remove files (for instance, skip “*.txt”),For multiple patterns, comma-separate them.



44
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/s3_sync.rb', line 44

attribute :exclude

#file_change_strategy:force, ...

Returns Difference determination method to allow changes-only syncing. Unlike rsync, files are not patched- they are fully skipped or fully uploaded.,date_size will upload if file sizes don’t match or if local file modified date is newer than s3’s version,checksum will compare etag values based on s3’s implementation of chunked md5s.,force will always upload all files.

Returns:

  • (:force, :checksum, :date_size, nil)

    Difference determination method to allow changes-only syncing. Unlike rsync, files are not patched- they are fully skipped or fully uploaded.,date_size will upload if file sizes don’t match or if local file modified date is newer than s3’s version,checksum will compare etag values based on s3’s implementation of chunked md5s.,force will always upload all files.



16
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/s3_sync.rb', line 16

attribute :file_change_strategy

#file_rootString

Returns File/directory path for synchronization. This is a local path.,This root path is scrubbed from the key name, so subdirectories will remain as keys.

Returns:

  • (String)

    File/directory path for synchronization. This is a local path.,This root path is scrubbed from the key name, so subdirectories will remain as keys.



28
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/s3_sync.rb', line 28

attribute :file_root

#includeString?

Returns Shell pattern-style file matching.,Used before exclude to determine eligible files (for instance, only “*.gif”),For multiple patterns, comma-separate them.

Returns:

  • (String, nil)

    Shell pattern-style file matching.,Used before exclude to determine eligible files (for instance, only “*.gif”),For multiple patterns, comma-separate them.



40
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/s3_sync.rb', line 40

attribute :include

#key_prefixString?

Returns In addition to file path, prepend s3 path with this prefix. Module will add slash at end of prefix if necessary.

Returns:

  • (String, nil)

    In addition to file path, prepend s3 path with this prefix. Module will add slash at end of prefix if necessary.



24
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/s3_sync.rb', line 24

attribute :key_prefix

#mime_mapHash?

Returns Dict entry from extension to MIME type. This will override any default/sniffed MIME type. For example C(“application/text”, “.yml”: “application/text”)rn.

Returns:

  • (Hash, nil)

    Dict entry from extension to MIME type. This will override any default/sniffed MIME type. For example C(“application/text”, “.yml”: “application/text”)rn



36
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/s3_sync.rb', line 36

attribute :mime_map

#mode:push

Returns sync direction.

Returns:

  • (:push)

    sync direction.



12
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/s3_sync.rb', line 12

attribute :mode

#permission:"", :private, :"public-read", :"public-read-write", :"authenticated-read", :"aws-exec-read", :"bucket-owner-read", :"bucket-owner-full-control"?

Returns Canned ACL to apply to synced files.,Changing this ACL only changes newly synced files, it does not trigger a full reupload.

Returns:

  • (:"", :private, :"public-read", :"public-read-write", :"authenticated-read", :"aws-exec-read", :"bucket-owner-read", :"bucket-owner-full-control", nil)

    Canned ACL to apply to synced files.,Changing this ACL only changes newly synced files, it does not trigger a full reupload.



32
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/s3_sync.rb', line 32

attribute :permission