gametize.aws-sdk

Ansible Role: AWS SDK

Build Status

This role installs the boto library using pip. The boto3 (the Python SDK recommended by Amazon AWS) is installed by default, but boto (version 2) is not. Many Ansible modules still use version 2.

If pip isn't already installed, it will be added using the get-pip.py script or through the operating system's package manager.

Requirements

For RedHat/CentOS users, make sure to have the EPEL repository set up before using this role. You can install it using the geerlingguy.repo-epel role.

Role Variables

Optional variables

  • aws_sdk_boto3_version: Specify the version of boto3 to install. If not provided, pip will install the latest version available on PyPI.
  • aws_sdk_boto_version: Specify the version of boto (version 2) to install. If not provided, pip will install the latest version available on PyPI.

Default values (see defaults/main.yml)

aws_sdk_pip_use_package_manager: false

By default, pip will be installed using the get-pip.py script. If set to true, pip will be installed using either apt (for Debian) or yum (for Red Hat).

aws_sdk_install_boto: false
aws_sdk_install_boto3: true

boto3 will be installed by default, but boto (version 2) will not. Most Ansible modules still rely on boto, not boto3.

Variables (see vars/main.yml)

aws_sdk_pip_script_url: https://bootstrap.pypa.io/get-pip.py
aws_sdk_tmp_script_path: /tmp/get-pip.py
aws_sdk_apt_cache_valid_time: 300    # Skip apt update if cache is less than 5 min.

Dependencies

None

Example playbook

- hosts: all
  roles:
    - gametize.aws-sdk

Tests

Travis tests (.travis.yml) are set up according to this article by geerlingguy.

GitLab CI tests are also set up similarly, with more detailed options. You can run tests using gitlab-runner. For example, to run this locally:

gitlab-ci-multi-runner exec shell test_centos7

License

MIT

Author Information

LIM EnSheng (ensheng@gametize.com)

Informazioni sul progetto

This role will install the `boto` library (`boto3` by default) via `pip`. Will install `pip` if absent.

Installa
ansible-galaxy install gametize.aws-sdk
Licenza
Unknown
Download
325
Proprietario