Typically a provisioning play that talks to the cloud is run locally. If you've added them to ~./bash_profile, be sure to source ~/.bash_profile.
(Do not run your provisioning play via a remote host, as Ansible will otherwise avoid loading this file to ensure repeatability in centralized management) If setting them with the DO module parameters, it's not intended you extract them again through the environment, it will either use the environmental parameters or the ones passed to the module. On Tue, Aug 12, 2014 at 1:24 AM, Synaesthete <[email protected]> wrote: > I'm attempting to implement a deployment playbook that deploys to digital > ocean. In the ansible docs on the digital_ocean module it states, > > "Two environment variables can be used, DO_CLIENT_ID and DO_API_KEY" > > I haven't yet written a task or playbook that uses environment variables > that are already set. I've tried setting these in the current process > manually as well as adding these environment variables in the current users > ~/.bash_profile. In both cases I get the following message: > > msg: Unable to load DO_CLIENT_ID > > I've also tried setting these variables in the digital_ocean task using > client_id={{ lookup('env','DO_CLIENT_ID') }} and still get the above > message. Any tips on what I'm doing wrong? > > 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 [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/2c780234-3e8e-46d5-b0ae-aebb475e0926%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/2c780234-3e8e-46d5-b0ae-aebb475e0926%40googlegroups.com?utm_medium=email&utm_source=footer> > . > 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/CA%2BnsWgzpROvq3HSNDFAcb50fqF%2BeNW%3DPA9_-tax7_N%3DBu9zMig%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
