epfl_si.s3cmd
Role Name
DEPRECATED - This role has been moved to the epfl_si.rhel collection.
This role installs the s3cmd
command on Debian and RedHat systems.
s3cmd
is used to upload, download, and list files from S3 storage.
Requirements
RHEL servers must have a valid subscription to use yum/dnf.
Role Variables
s3_access_key
: required access keys3_secret_key
: required secret keys3_host_bucket
: default bucket (required)s3_human_readable_sizes
: true/false to show file size in k/M/G instead of bytess3_host_base
: The URI of your S3 servers3_website_endpoint
: The API URIs3cmd_user
: The user for whom you want to create a .s3cfg file. This cannot be a list.s3_global_env_var
: true/false to create a variable called$S3
with the default bucket. This will generate a file at /etc/profiles.d/s3.sh, allowing the user to run:s3cmd ls $S3
.
Dependencies
None
Example requirements.yml
---
roles:
- name: epfl_si.s3cmd
version: 9f1b65e
Example Inventory
group_vars/main.yml:
---
s3_host_base: "s3.example.com"
s3_website_endpoint: "https://s3.example.com/_/s3browser/"
s3_access_key: "{{ vault_s3_access_key }}"
s3_secret_key: "{{ vault_s3_secret_key }}"
s3_host_bucket: "svc0000-12345678912345678912345678912345"
s3_human_readable_sizes: true
s3_global_env_var: true
group_vars/vault.yml:
---
vault_s3_access_key: ***
vault_s3_secret_key: ***
Example Playbook
Here's how to use this role (for example, by passing in variables):
- hosts: servers
roles:
- role: epfl_si.s3cmd
s3cmd_user: appadm
- role: epfl_si.s3cmd
s3cmd_user: root
License
MIT
Author Information
This role was created by Laurent Indermühle