Created
July 18, 2016 20:11
-
-
Save abby-fuller/81efa8375d1541b1b8b058f8764facff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#configure awscli | |
- name: configure awscli | |
sudo: yes | |
shell: mkdir -p /home/vagrant/.aws && touch /home/vagrant/.aws/config | |
- name: change permissions | |
sudo: yes | |
shell: chmod -R 666 /home/vagrant/.aws/* | |
- name: create default config | |
sudo: yes | |
shell: echo "[default]" >> /home/vagrant/.aws/config | |
- name: add access key | |
sudo: yes | |
shell: echo "aws_access_key_id={{ ACCESS_KEY }}" >> /home/vagrant/.aws/config | |
- name: add secret key | |
sudo: yes | |
shell: echo "aws_secret_access_key={{ SECRET_ACCESS_KEY }}" >> /home/vagrant/.aws/config | |
- name: default to us-east-1 | |
sudo: yes | |
shell: echo "region=us-east-1" >> /home/vagrant/.aws/config | |
- name: default to json. to use text, can switch to "output=text" | |
sudo: yes | |
shell: echo "output=json" >> /home/vagrant/.aws/config | |
- name: set config file location | |
sudo: yes | |
shell: echo 'AWS_CONFIG_FILE="/home/vagrant/.aws/config"' >> /etc/environment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment