Forge Home

s3cmd

S3cmd Module

9,113 downloads

9,113 latest version

2.3 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.2.1 (latest)
released Apr 21st 2015

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'ilanco-s3cmd', '0.2.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add ilanco-s3cmd
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install ilanco-s3cmd --version 0.2.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

ilanco/s3cmd — version 0.2.1 Apr 21st 2015

S3cmd module for Puppet

This module manages s3cmd on Linux (RedHat/Debian) distros.

Description

This module uses the fact osfamily which is supported by Facter 1.6.1+. If you do not have facter 1.6.1 in your environment, the following manifests will provide the same functionality in site.pp (before declaring any node):

if ! $::osfamily {
  case $::operatingsystem {
    'RedHat', 'Fedora', 'CentOS', 'Scientific', 'SLC', 'Ascendos', 'CloudLinux', 'PSBM', 'OracleLinux', 'OVS', 'OEL': {
      $osfamily = 'RedHat'
    }
    'ubuntu', 'debian': {
      $osfamily = 'Debian'
    }
    'SLES', 'SLED', 'OpenSuSE', 'SuSE': {
      $osfamily = 'Suse'
    }
    'Solaris', 'Nexenta': {
      $osfamily = 'Solaris'
    }
    default: {
      $osfamily = $::operatingsystem
    }
  }
}

Usage

s3cmd

Installs and configures s3cmd command line tool (http://s3tools.org/s3cmd).

class {'s3cmd':
    aws_access_key => '*********************************',
    aws_secret_key => '*********************************',
    gpg_passphrase => 'gpg password for encryption',
    owner => 'owner',
}
  • Retrieve aws access and secret key from your aws account
  • gpg_passphrase is a password used from encrypting and decrypting data. The passphrase is yours to choose.
  • owner is the user that will run the s3cmd command. The s3cmd configuration file will be stored in users home directory

s3cmd::commands::get

Downloads an object from s3.

s3cmd::commands::get{'local file': s3_object => 's3://(bucket name)/(object name)', cwd => 'working directory', owner => 'owner', }

  • The name of the s3::commands::get is the local file name of the object you are retrieving
  • s3_object is the https path to the s3 object
  • owner is the owner of the s3cmd command. It is the same owner as declared in the s3cmd class.