diff --git a/lib/ansible/modules/cloud/vmware/vsphere_guest.py b/lib/ansible/modules/cloud/vmware/vsphere_guest.py index 9ca2908edff..4e82cb4d939 100644 --- a/lib/ansible/modules/cloud/vmware/vsphere_guest.py +++ b/lib/ansible/modules/cloud/vmware/vsphere_guest.py @@ -1604,9 +1604,18 @@ def main(): module = AnsibleModule( argument_spec=dict( - vcenter_hostname=dict(required=True, type='str'), - username=dict(required=True, type='str'), - password=dict(required=True, type='str', no_log=True), + vcenter_hostname=dict( + type='str', + default=os.environ['VMWARE_HOST'] + ), + username=dict( + type='str', + default=os.environ['VMWARE_USER'] + ), + password=dict( + type='str', no_log=True, + default=os.environ['VMWARE_PASSWORD'] + ), state=dict( required=False, choices=[