-
Notifications
You must be signed in to change notification settings - Fork 13
/
main.yml
28 lines (27 loc) · 1.45 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
#
# Note: Using the 'default' attribute in the env lookup resulted in odd behavior. It would set the collection variable to undefined
# even when the corresponding vmware_ops_ variable was set. To work around this, we use the default filter with the second attribute
# set to True. This causes the filter to return a default value if the lookup returns an empty string, i.e. if the env var is not set.
#
vmware_ops_collection_hostname: >-
{{ vmware_ops_hostname |
default(lookup('ansible.builtin.env', 'VMWARE_HOST') | default(Undefined, True)) }}
vmware_ops_collection_username: >-
{{ vmware_ops_username |
default(lookup('ansible.builtin.env', 'VMWARE_USER') | default(Undefined, True)) }}
vmware_ops_collection_password: >-
{{ vmware_ops_password |
default(lookup('ansible.builtin.env', 'VMWARE_PASSWORD') | default(Undefined, True)) }}
vmware_ops_collection_validate_certs: >-
{{ vmware_ops_validate_certs |
default(lookup('ansible.builtin.env', 'VMWARE_VALIDATE_CERTS') | default(Undefined, True)) }}
vmware_ops_collection_port: >-
{{ vmware_ops_port |
default(lookup('ansible.builtin.env', 'VMWARE_PORT') | default(Undefined, True)) }}
vmware_ops_collection_proxy_host: >-
{{ vmware_ops_proxy_host |
default(lookup('ansible.builtin.env', 'VMWARE_PROXY_HOST') | default(Undefined, True)) }}
vmware_ops_collection_proxy_port: >-
{{ vmware_ops_proxy_port |
default(lookup('ansible.builtin.env', 'VMWARE_PROXY_PORT') | default(Undefined, True)) }}