Skip to content

Instantly share code, notes, and snippets.

@tgerla
Last active August 29, 2015 14:23
Show Gist options
  • Save tgerla/67e5f90fffa514773216 to your computer and use it in GitHub Desktop.
Save tgerla/67e5f90fffa514773216 to your computer and use it in GitHub Desktop.
We set environment variables for the playbook run based on the type of cloud credential, so that the
modules can pick them up. If the modules are explicitly passed the keys, that will of course override
the cloud credential selection.
For AWS: AWS_ACCESS_KEY and AWS_SECRET_KEY
For Rackspace: RAX_USERNAME and RAX_API_KEY
For Google Compute Engine: GCE_EMAIL, GCE_PROJECT, and GCE_PEM_FILE_PATH
For Azure: AZURE_SUBSCRIPTION_ID and AZURE_CERT_PATH
For VMware: VMWARE_USER, VMWARE_PASSWORD, and VMWARE_HOST.
If you need to access these in your playbook, you can use {{ lookup('env', 'AWS_ACCESS_KEY') }} to
use the variables in other ways. Otherwise, the modules themselves will pick those up properly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment