Bootstrap FreeKB - Ansible - Set Amazon Web Services (AWS) Profile Configurations
Ansible - Set Amazon Web Services (AWS) Profile Configurations

Updated:   |  Ansible articles

If you are not familiar with modules, check out Ansible - Getting Started with Modules.

Prerequisites

command can be used to set your Amazon Web Services (AWS) Profile Configurations, something like this.

---
- name: aws profile setup play
  hosts: all
  tasks:
  - name: setup aws profile configurations
    command: "{{ item }}"
    with_items:
    - /usr/local/bin/aws configure set region us-east-1 --profile johndoe
    - /usr/local/bin/aws configure set default.region us-east-1
    - /usr/local/bin/aws configure set default.output json
    - /usr/local/bin/aws configure set output json --profile johndoe
    - /usr/local/bin/aws configure set default.aws_secret_access_key ABCDEFG123456789ABCDEFG123456789
    - /usr/local/bin/aws configure set aws_secret_access_key ABCDEFG123456789ABCDEFG123456789 --profile johndoe
    - /usr/local/bin/aws configure set default.aws_access_key_id ABCDEFG1234567890
    - /usr/local/bin/aws configure set aws_access_key_id ABCDEFG1234567890 --profile johndoe
...

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 53c1fb in the box below so that we can be sure you are a human.