Hey all,
few weeks ago we decided to use AWS profiles (not to use the default one) but I'm not sure how to set profile (and region) in ansible.
There is no such configuration in ansible.cfg (
https://docs.ansible.com/ansible/latest/reference_appendices/config.html).
So instead of this:
- debug: var="{{ lookup('amazon.aws.aws_secret', 'redis/access') }}"
we have to do this:
- debug: var="{{ lookup('amazon.aws.aws_secret', 'redis/access', profile='xxx', region='eu-central-1') }}"
which is annoying.
As a workaround we can use environmental variables (
AWS_PROFILE and
AWS_REGION) but setting it globally or prepending to every ansible-playbook call is not ideal.
❓️ is there a way ho to set environmental variables in ansible.cfg or ansible in general
❓️