summaryrefslogtreecommitdiff
path: root/lib/ansible/plugins/inventory
diff options
context:
space:
mode:
authorStrahinja Kustudic <kustodian@gmail.com>2019-06-12 23:36:57 +0200
committeransibot <ansibot@users.noreply.github.com>2019-06-12 17:36:57 -0400
commit8e9f29c40cb7b4df6cd097ab3a5758e1e2aea034 (patch)
treeeac0658184c53a6fac00b9b22afbfd7570ddbf7a /lib/ansible/plugins/inventory
parent73a16749cb1e70da9a2e6a1e80216fb0026fe9c4 (diff)
downloadansible-8e9f29c40cb7b4df6cd097ab3a5758e1e2aea034.tar.gz
Added environment variables to gcp_compute to align with gcp_* modules (#57776)
Added all variables that are also used by the gcp_* modules as described in the docs https://docs.ansible.com/ansible/latest/scenario_guides/guide_gce.html#providing-credentials-as-environment-variables
Diffstat (limited to 'lib/ansible/plugins/inventory')
-rw-r--r--lib/ansible/plugins/inventory/gcp_compute.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/ansible/plugins/inventory/gcp_compute.py b/lib/ansible/plugins/inventory/gcp_compute.py
index cd7cd698c0..4e1310e6fa 100644
--- a/lib/ansible/plugins/inventory/gcp_compute.py
+++ b/lib/ansible/plugins/inventory/gcp_compute.py
@@ -48,21 +48,32 @@ DOCUMENTATION = '''
- The type of credential used.
required: True
choices: ['application', 'serviceaccount', 'machineaccount']
+ env:
+ - name: GCP_AUTH_KIND
+ version_added: "2.8"
scopes:
description: list of authentication scopes
type: list
default: ['https://www.googleapis.com/auth/compute']
+ env:
+ - name: GCP_SCOPES
+ version_added: "2.8"
service_account_file:
description:
- The path of a Service Account JSON file if serviceaccount is selected as type.
type: path
env:
+ - name: GCP_SERVICE_ACCOUNT_FILE
+ version_added: "2.8"
- name: GCE_CREDENTIALS_FILE_PATH
version_added: "2.8"
service_account_email:
description:
- An optional service account email address if machineaccount is selected
and the user does not wish to use the default email.
+ env:
+ - name: GCP_SERVICE_ACCOUNT_EMAIL
+ version_added: "2.8"
vars_prefix:
description: prefix to apply to host variables, does not include facts nor params
default: ''