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

<localhost> 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. 

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1e69003d-1bc4-46b9-921f-1522feb7451e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to