Hello
I’ve been trying to get my team at work to adopt better credential management but I’m struggling to get ansible working with the aws cli credentials file. My credentials file seems to work just fine with aws cli and directly using boto in a python script but not in ansible. My file is setup as below
`
credentials
[default]
aws_access_key_id=PARENTKEY
aws_secret_access_key=PARENTSECRETKEY
[childprofile]
role_arn=arn:aws:iam::########:role/groupname
source_profile=default
`
but when I execute the playbook I just get
`
“msg”: “Profile given for AWS was not found. Please fix and retry.”
`
I know that the profile name is being correctly as this is shown in the verbose output
`
EXEC /bin/sh -c ‘AWS_PROFILE=childprofile /usr/bin/python /home/user/.ansible/tmp/ansible-tmp-1519121014.43-259509127929346/ec2_vpc_net.py; rm -rf “/home/user/.ansible/tmp/ansible-tmp-1519121014.43-259509127929346/” > /dev/null 2>&1 && sleep 0’
`
and I know that the credentials file works because if I replace the role and the source_profile with aws_access_key and aws_secret_access_key it works.
I’ve been looking at this for a few days and can’t figure it out.