Created
March 27, 2020 09:29
-
-
Save markuman/6d1fd6555135a465ef9c9164bf4e3ec9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
--- | |
- hosts: localhost | |
connection: local | |
gather_facts: False | |
collections: | |
- community.aws | |
- amazon.aws | |
vars: | |
PROFILE: "{{ lookup('env', 'AWS_PROFILE' )}}" | |
module_defaults: | |
group/aws: | |
aws_access_key: "{{ lookup('ini', 'aws_access_key_id section=' + PROFILE + ' file=~/.aws/credentials') }}" | |
aws_secret_key: "{{ lookup('ini', 'aws_secret_access_key section=' + PROFILE + ' file=~/.aws/credentials') }}" | |
security_token: "{{ lookup('ini', 'aws_session_token section=' + PROFILE + ' file=~/.aws/credentials') }}" | |
region: eu-central-1 | |
tasks: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment