Repository: ansible/ansible

Issue:
added default datacenter ha-datacenter and set wait_for_ip_address to…
… default False - closes 21074

##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
 - Bugfix Pull Request


##### COMPONENT NAME
<!--- Name of the module/plugin/module/task -->
vmware_guest
##### ANSIBLE VERSION
<!--- Paste verbatim output from “ansible --version” between quotes below -->
```
ansible --version

ansible 2.3.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides

```

##### SUMMARY
<!--- Describe the change, including rationale and design decisions -->
Attempt to use vmware_guest with a direct ESXi host without specifying a datacenter. You get an error.

If you install a fresh install of ESXi the default datacenter will always be:

govc ls
/ha-datacenter/vm
/ha-datacenter/network
/ha-datacenter/host
/ha-datacenter/datastore

The default setting for datacenter should be ha-datacenter.
<!---
If you are fixing an existing issue, please include "Fixes #nnn" in your
commit message and your description; but you should still explain what
the change does.
-->

<!-- Paste verbatim command output below, e.g. before and after your change -->
```
---
- name: create vm
  hosts: localhost
  tasks:
    - vmware_guest:
        hostname: "10.x.x.165"
        username: "root"
        password: "***"
        validate_certs: False
        name: "testvm"
        validate_certs: False
        #datacenter: "ha-datacenter"
        #wait_for_ip_address: False
        state: present      
```



Discussion:
cc @jctanner @nerzhul
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->
!needs_rebase
shipit
should be up2date now. Thanks @nerzhul !
seems you merge instead of rebase :(
shipit
If the description clearly stated: "This closes #21074" the issue would automatically close.
Now there is no relation to it.

shipit
bot_status

@jctanner when the merge will occur ?
**waiting_on**: maintainer
**module**: vmware_guest
**supported_by**: community
**maintainers**: jctanner nerzhul dav1x
changes_requested_by: null
needs_info: False
needs_revision: False
needs_rebase: False
merge_commits: []
mergeable_state: clean
shippable_status: success
maintainer_shipits: 1
community_shipits: 1
ansible_shipits: 0
shipit_actors: nerzhul dagwieers

[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: bot_status --->

Resolving patch:
diff --git a/lib/ansible/modules/cloud/vmware/vmware_guest.py b/lib/ansible/modules/cloud/vmware/vmware_guest.py
--- a/lib/ansible/modules/cloud/vmware/vmware_guest.py
+++ b/lib/ansible/modules/cloud/vmware/vmware_guest.py
@@ -107,7 +107,7 @@
    datacenter:
         description:
             - Destination datacenter for the deploy operation
-        required: True
+        required: False
         default: ha-datacenter
    cluster:
         description:
@@ -1262,7 +1262,7 @@ def main():
             disk=dict(required=False, type='list', default=[]),
             hardware=dict(required=False, type='dict', default={}),
             force=dict(required=False, type='bool', default=False),
-            datacenter=dict(required=True, type='str', default='ha-datacenter'),
+            datacenter=dict(required=False, type='str', default='ha-datacenter'),
             esxi_hostname=dict(required=False, type='str', default=None),
             cluster=dict(required=False, type='str', default=None),
             wait_for_ip_address=dict(required=False, type='bool', default=False),


Test patch: