No, just keep it simple and set the environment variables; then you
can't accidentally
commit credentials to a repo or use the wrong account.

http://docs.ansible.com/ansible/guide_aws.html


On 4 July 2017 at 11:33, Suporter <[email protected]> wrote:
> Sorry, i dont really know where to start,
> Should i save the keys in some file and refer that fiile in the playbook as
> a variable?
>
> On Tuesday, July 4, 2017 at 3:53:38 PM UTC+5:30, Dick Davies wrote:
>>
>> Sorry I thought you wanted to know about file lookups (in this case
>> it's ssh keys).
>>
>> If the -e 'credentials=/path/to/credentials' , you just need to lookup
>> the file and
>> read it's contents. Or just set environment variables before you run
>> the playbook, I
>> thought the aws related modules read the environment fine.
>>
>> On 4 July 2017 at 09:07, Suporter <[email protected]> wrote:
>> > Oh my god, my head is spinning. I have 3 accounts in AWS, i need to
>> > create a
>> > file for each account? and then i need to give that name in playbook?
>> >
>> > i am expecting something like this
>> >
>> > ansible-playbook newmachine.yml --extra-vars "account=myaccount"   and i
>> > want the new ec2 instance to be spinned up in that account. how can i do
>> > this?
>> >
>> > On Thursday, June 29, 2017 at 11:28:59 AM UTC+5:30, Suporter wrote:
>> >>
>> >> Hi Ansiblers,
>> >>        How can i use same playbook for multiple aws accounts, can i
>> >> give
>> >> the access key and secret key as command line paramters in playbook?
>> >
>> > --
>> > 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/387b9c74-48a7-403d-b1b9-651c81b2312e%40googlegroups.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.

-- 
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/CAK5eLPQyV1%2Be0b4q0RWu3PZh6B-A6-L%2BuP2_o7OpWR2wVaMYBQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to