tolerate environment not being set

default will be the same as before, None/null
This commit is contained in:
Brian Coca 2016-02-23 12:36:50 -05:00
parent a7e399955f
commit 814527fca9

View file

@ -1609,15 +1609,15 @@ def main():
argument_spec=dict(
vcenter_hostname=dict(
type='str',
default=os.environ['VMWARE_HOST']
default=os.environ.get('VMWARE_HOST')
),
username=dict(
type='str',
default=os.environ['VMWARE_USER']
default=os.environ.get('VMWARE_USER')
),
password=dict(
type='str', no_log=True,
default=os.environ['VMWARE_PASSWORD']
default=os.environ.get('VMWARE_PASSWORD')
),
state=dict(
required=False,