Giter VIP home page Giter VIP logo

awscli's Introduction

awscli

License Build Status

Platform

Project Stats

Ansible role to install the AWS command line interface and configure the credentials and profiles.

Tests

Family Distribution Version Test Status
Debian Ubuntu Precise x86 x86_64
Debian Ubuntu Trusty x86 x86_64

Requirements

  • ansible >= 1.9.4

Role Variables

  • debug: flag to run debug tasks.
  • awscli_configuration: dictionary containing a series of AWS profile configuration options.
  • awscli_profiles: dictionary containing a series of AWS profile credentials.
  • awscli_users: dictionary containing a series of user accounts and their profiles and configuration.
  • awscli_version: the version to be installed.
  • awscli_virtualenv: in case the tool is to be installed on a virtualenv, use this parameter to specify the path.

Unless stated otherwise a default value is provided for each of the variables mentioned above in defaults/main.yml.

Dependencies

Playbooks

Example:

- hosts: servers
  vars:
    debug: yes

  roles:
    - role: awscli
      awscli_profiles:
        default:
          aws_access_key_id: AKIAIOSFODNN7EXAMPLE
          aws_secret_access_key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
        user2:
          aws_access_key_id: AKIAI44QH8DHBEXAMPLE
          aws_secret_access_key: je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY
      awscli_configuration:
        default:
          region: us-west-2
          output: json
        conf_east1_text:
          region: us-east-1
          output: text
      awscli_users:
        ec2-user:
          profiles:
            - default
          configuration:
            default: default
        vagrant:
          profiles:
            - default
            - user2
          configuration:
            default: default
            user2: conf_east1_text
       tags: [ awscli ]

This would generate the following configuration files:

# ~ec2-user/.aws/credentials
[default]
aws_access_key_id=AKIAIOSFODNN7EXAMPLE
aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

# ~ec2-user/.aws/config
[default]
region=us-west-2
output=json


# ~vagrant/.aws/credentials
[default]
aws_access_key_id=AKIAIOSFODNN7EXAMPLE
aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

[user2]
aws_access_key_id=AKIAI44QH8DHBEXAMPLE
aws_secret_access_key=je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY

# ~vagrant/.aws/config
[default]
region=us-west-2
output=json

[profile user2]
region=us-east-1
output=text

Tags

  • configuration: configuration tasks.
  • debug: task to debug role variables.
  • installation: installation tasks.
  • validation: task to validate role variables.

Test

To run the tests you will need to install:

To run all tests against all pre-defined OS/distributions * ansible versions:

$ tox

To run tests for trusty64:

$ cd tests
$ bash test_idempotence.sh --box trusty64.vagrant.dev
# log file will be stores under tests/log

To perform debugging on a specific environment:

$ cd tests
$ vagrant up trusty64.vagrant.dev

# to provision using the test.yml playbook (as many time as you need)
$ vagrant provision trusty64.vagrant.dev

# to access the Vagrant box
$ vagrant ssh trusty64.vagrant.dev

Links

Author Information

awscli's People

Contributors

steenzout avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.