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/CAK5eLPSw1XxCzH9HHohP23my-tH1qx%3DnypXCqEEn_rEdEp%2BJkA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
