LukasGibb.s3cmd

s3cmd

An Ansible role that installs and sets up s3cmd.

Requirements

You need an AWS account and the access keys for your s3 bucket.

Role Variables

Check defaults/main.yml.

All variables are grouped under the s3cmd key:

s3cmd:
  key: 'aws-key'
  secret: 'aws-secret'
  user: 'username'
  path: '/custom/path'
  • key: 'aws-key'

    This is your public IAM key.

  • secret: 'aws-secret'

    This is your secret IAM key. Do not keep these in plain text. Use Ansible Vault or a similar secure storage method.

  • user: 'root'

    This is the user under which the .s3cfg file will be placed. By default, it will be the root user.

  • path: '/custom/path'

    Use this if you want the config file stored in a directory that's not the user's home directory. This can be useful if the user is a service or daemon without a home directory.

Dependencies

None

Example Playbook

You will need to provide your own AWS keys (not the example/default ones).

The example below uses encrypted strings via Ansible Vault:

- hosts: servers
  vars: 
    s3cmd:
      key: !vault |
      $ANSIBLE_VAULT;1.1;AES256
      [encrypted key here]
      secret: !vault |
      $ANSIBLE_VAULT;1.1;AES256
      [encrypted secret here]
      user: 'john'

  roles:
    - lukasgibb.s3cmd

License

MIT

Author Information

This role was created in 2019 by: Lukas Gibb from CloudJourneyman.com

Informazioni sul progetto

An Ansible role that installs and configures s3cmd

Installa
ansible-galaxy install LukasGibb.s3cmd
Licenza
mit
Download
4.6k
Proprietario