Fixed.  Had become: True in my build.yml so it was looking for root's 
credentials file /root/.aws/credentials

On Thursday, June 22, 2017 at 11:43:02 AM UTC+1, B Holmes wrote:
>
> Hi,
>
> I'm having trouble authenticating to AWS using a profile.  My 
> ~/.aws/credentials file has a profile named production:
> [default]
> aws_access_key_id = <some_key>
> aws_secret_access_key = <some_secret>
> region = eu-west-1
>
> [production]
> aws_access_key_id = <my_key>
> aws_secret_access_key = <my_secret>
> region = eu-west-1
>
> Boto can see it:
> import boto3
>
> session = boto3.Session(profile_name='production')
> session.available_profiles
>
> Out[7]:
> ['default',
>  'production']
>
> Yet while this playbook works fine:
> - name: example ec2 group
>   ec2_group:
>     name: example2
>     description: an example EC2 group
>     region: eu-west-1
>
> *    aws_secret_key: <my_key>    aws_access_key: <my_secret>*
>     rules:
>
> this one errors:
> - name: example ec2 group
>   ec2_group:
>     name: example2
>     description: an example EC2 group
>     *profile**: production*
>     region: eu-west-1
>     rules:
>
> An exception occurred during task execution. To see the full traceback, 
> use -vvv. *The error was: boto.provider.ProfileNotFoundError: Profile 
> "production" not found!*
>
> Anyone seen this before?  If ~/.aws/credentials isn't being checked, what 
> file is?
>
> Many thanks.
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/32d2f38e-d009-43f7-9fdc-59471e337328%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to