Commit graph

129 commits

Author SHA1 Message Date
Cougar
fbdb448661 vmware_guest Fix: remove 'nic' and 'disk' requirements for facts (#2844) 2016-09-13 14:03:08 -04:00
Robin Schneider
67a1bebbd3 Use addresses and names reserved for documentation (#2894)
Trying to preserve the meaning of the examples.

Related to: https://github.com/ansible/ansible/issues/17479
2016-09-12 11:27:45 +02:00
Joe Smith
44c86245ff Set explicit type for timeout (#2809)
vmware_maintenancemode.py needs explicit type for timeout, otherwise it reads timeout as string and breaks.
2016-08-30 21:55:41 +02:00
René Moser
b58bd264e8 vmware_local_user_manager: fix global name 'module' is not defined (#2818) 2016-08-30 16:39:58 +02:00
bbooysen
5767885ae5 typo fix (#2816)
Changed 'memroy' to 'memory'.
2016-08-30 14:06:32 +02:00
Russell Teague
a2d23983c0 Fix vmware_dvs_portgroup destroy task (#2776)
Fixes #2761
2016-08-25 18:48:25 +02:00
jctanner
5fe51b4422 Fix vmware_guest disk and nic parameters and docstrings (#2705)
* Fix vmware_guest disk and nic parameters and docstrings
* vmware_guest: remove default for required params
2016-08-10 12:46:02 -04:00
James Tanner
13215eeb7c Consolidate to one module and use new arg spec 2016-08-02 11:28:03 -04:00
James Tanner
6cebd509d7 add examples 2016-08-01 23:08:30 -04:00
James Tanner
cf61825ae5 Remove print statements 2016-08-01 23:04:00 -04:00
James Tanner
a3f415a892 fix tabs 2016-08-01 22:47:26 -04:00
James Tanner
5d2d0e0045 fix tabs 2016-08-01 22:38:41 -04:00
James Tanner
07fb05a852 Add the guest state module 2016-08-01 22:20:05 -04:00
James Tanner
3caee773cb Rename module 2016-08-01 21:40:12 -04:00
James Tanner
c51b1549a2 Add return data example 2016-08-01 21:34:33 -04:00
James Tanner
6b5ad394da Add template deployer 2016-08-01 18:55:22 -04:00
Rene Moser
5a3dc054bd doc: remove common return values from various modules 2016-07-08 10:54:31 +02:00
Andreas Nafpliotis
47b9ede3be New module: vmware_local_users_manager (#2447)
* Add files via upload

* Add files via upload

* Fixed build errors

* Fixed some identation errors

* Documentation corrections

* Documentation updates
2016-07-08 00:39:59 +02:00
camradal
5588cc9c02 Add configuration options to VMWare portgroup (#2390)
* Add configuration options to VMWare portgroup

* Add version_added to newly added vmware portgroup params

* Update vmware_porgroup to use network_policy node for settings

* Update documentation for vmware_porgroup network policy
2016-07-03 10:49:42 +02:00
Bede Carroll
1e405bb472 Add vMotion Module (#2342) 2016-06-13 14:51:03 -04:00
Toshio Kuratomi
2a5812a0e8 Move the import of get_exception to pycompat24 2016-05-18 06:23:10 -07:00
Toshio Kuratomi
8ecc3d2516 Port vspherer_copy to pass syntax checks on python3 2016-05-17 10:39:23 -07:00
Michael Scherer
84ec0c8faf Port vca_nat and vca_fw to py3 compatible syntax (#2243)
Since they both depend on library that cannot run on python2.4,
cf https://github.com/ansible/ansible/pull/15870, we can use
directly the python 2.6 syntax, as seen on the porting doc.
2016-05-17 10:34:01 -07:00
Lakshmi Balu
cfc6d1cf62 Update vmware_datacenter.py (#2164)
Fixed the syntac issue variable references before definiton
2016-05-05 12:24:30 +02:00
Toshio Kuratomi
675d778b50 Fix documentation 2016-05-03 10:10:28 -07:00
krzwalko
12f1c85aa3 Fix datacenter_name and cluster_name module params (#2142) 2016-05-02 08:50:11 -04:00
Rene Moser
de22b721db vmware_vm_shell: doc: add missing defaults 2016-04-23 08:27:21 +02:00
Ritesh Khadgaray
e24c3b93fe vmware_vm_shell: speed up vm_name search (#1909) 2016-04-23 08:19:17 +02:00
Jay Jahns
05068630ca Add Maintenance Mode support for VMware (#1754)
* add vmware maintenance mode support

* changed version number in documentation

* updated version_added to 2.0 since CI is failing

* changed version to 2.0 due to CI - error asking for 2.1

* added RETURN

* updated formatting of return values and added some to clarify actions taken
2016-04-17 10:42:31 +02:00
Kamil Szczygieł
01a15f8a0b VMware datacenter module shouldn't hold pyvmomi context in Ansible module object (#1568)
* VMware datacenter module rewritten to don't hold pyvmomi context and objects in Ansible module object

fixed exceptions handling

added datacenter destroy result, moved checks

changed wrong value

wrong value again... need some sleep

* check_mode fixes

* state defaults to present, default changed to true

* module check fixes
2016-04-12 11:11:33 +02:00
Alex Kalinin
0a9ac470df Fix vmware_portgroup throwing an error if port group already exists 2016-03-17 17:00:00 -07:00
Brian Coca
f6d2763671 Merge pull request #1626 from jcpowermac/vmware_migrate_vmk_fix_20
Resolves issue with vmware_migrate_vmk module for v2.0
2016-03-03 18:45:45 -05:00
Brian Coca
478ca3d321 Merge pull request #1625 from jcpowermac/vmware_vm_vss_dvs_migrate_fix_20
Resolves issue with vmware_vm_vss_dvs_migrate module for v2.0
2016-03-03 18:45:31 -05:00
Brian Coca
9f67ed64a3 Merge pull request #1624 from jcpowermac/vmware_host_fix_20
Resolves issue with vmware_host module for v2.0
2016-03-03 18:45:10 -05:00
Brian Coca
fe5168a395 Merge pull request #1622 from jcpowermac/vmware_dvs_portgroup_fix_20
Resolves issue with vmware_dvs_portgroup module for v2.0
2016-03-03 18:44:56 -05:00
Brian Coca
18c654b90e Merge pull request #1620 from jcpowermac/vmware_cluster_fix_20
Resolves issue with vmware_cluster module for v2.0
2016-03-03 18:44:40 -05:00
Brian Coca
a68ff8c9c8 Merge pull request #1623 from jcpowermac/vmware_dvs_host_fix_20
Resolves issue with vmware_dvs_host module for v2.0
2016-03-03 18:43:47 -05:00
Brian Coca
c439cc9ca6 Merge pull request #1621 from jcpowermac/vmware_dvswitch_fix_20
Resolves issue with vmware_dvswitch module for v2.0
2016-03-01 00:16:00 -05:00
Brian Coca
6049368b45 Merge pull request #1580 from jcpowermac/vmware_vswitch_fix_20
Resolves issue with vmware_vswitch module for v2.0
2016-03-01 00:10:02 -05:00
Brian Coca
14ff9e5030 merged duplicate entries for vdc_name 2016-02-14 11:33:41 -05:00
Joseph Callen
35a04ff134 Resolves issue with vmware_migrate_vmk module for v2.0
When this module was written back in May 2015 we were using 1.9.x. Being lazy I added to param the objects that the other functions would need. What I have noticed is in 2.0 exit_json is trying to jsonify those complex objects and failing. This PR resolves that issue with the vmware_migrate_vmk module.

@kamsz reported this issue in https://github.com/ansible/ansible-modules-extras/pull/1568

Playbook
```
- name: Migrate Management vmk
      local_action:
        module: vmware_migrate_vmk
        hostname: "{{ mgmt_ip_address }}"
        username: "{{ vcsa_user }}"
        password: "{{ vcsa_pass }}"
        esxi_hostname: "{{ hostvars[item].hostname }}"
        device: vmk1
        current_switch_name: temp_vswitch
        current_portgroup_name: esx-mgmt
        migrate_switch_name: dvSwitch
        migrate_portgroup_name: Management
      with_items: groups['foundation_esxi']
```

Module Testing
```
TASK [Migrate Management vmk] **************************************************
task path: /opt/autodeploy/projects/emmet/tasks/deploy/migrate_vmk.yml:3
ESTABLISH LOCAL CONNECTION FOR USER: root
localhost EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1454695485.85-245405603184252 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1454695485.85-245405603184252 )" )
localhost PUT /tmp/tmpdlhr6t TO /root/.ansible/tmp/ansible-tmp-1454695485.85-245405603184252/vmware_migrate_vmk
localhost EXEC LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1454695485.85-245405603184252/vmware_migrate_vmk; rm -rf "/root/.ansible/tmp/ansible-tmp-1454695485.85-245405603184252/" > /dev/null 2>&1
localhost EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1454695490.35-143738865490168 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1454695490.35-143738865490168 )" )
localhost PUT /tmp/tmpqfZqh1 TO /root/.ansible/tmp/ansible-tmp-1454695490.35-143738865490168/vmware_migrate_vmk
localhost EXEC LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1454695490.35-143738865490168/vmware_migrate_vmk; rm -rf "/root/.ansible/tmp/ansible-tmp-1454695490.35-143738865490168/" > /dev/null 2>&1
localhost EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1454695491.96-124154332968882 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1454695491.96-124154332968882 )" )
localhost PUT /tmp/tmpf3rKZq TO /root/.ansible/tmp/ansible-tmp-1454695491.96-124154332968882/vmware_migrate_vmk
localhost EXEC LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1454695491.96-124154332968882/vmware_migrate_vmk; rm -rf "/root/.ansible/tmp/ansible-tmp-1454695491.96-124154332968882/" > /dev/null 2>&1
ok: [foundation-vcsa -> localhost] => (item=foundation-esxi-01) => {"changed": false, "invocation": {"module_args": {"current_portgroup_name": "esx-mgmt", "current_switch_name": "temp_vswitch", "device": "vmk1", "esxi_hostname": "cscesxtmp001", "hostname": "172.27.0.100", "migrate_portgroup_name": "Management", "migrate_switch_name": "dvSwitch", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "username": "root"}, "module_name": "vmware_migrate_vmk"}, "item": "foundation-esxi-01"}
ok: [foundation-vcsa -> localhost] => (item=foundation-esxi-02) => {"changed": false, "invocation": {"module_args": {"current_portgroup_name": "esx-mgmt", "current_switch_name": "temp_vswitch", "device": "vmk1", "esxi_hostname": "cscesxtmp002", "hostname": "172.27.0.100", "migrate_portgroup_name": "Management", "migrate_switch_name": "dvSwitch", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "username": "root"}, "module_name": "vmware_migrate_vmk"}, "item": "foundation-esxi-02"}
ok: [foundation-vcsa -> localhost] => (item=foundation-esxi-03) => {"changed": false, "invocation": {"module_args": {"current_portgroup_name": "esx-mgmt", "current_switch_name": "temp_vswitch", "device": "vmk1", "esxi_hostname": "cscesxtmp003", "hostname": "172.27.0.100", "migrate_portgroup_name": "Management", "migrate_switch_name": "dvSwitch", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "username": "root"}, "module_name": "vmware_migrate_vmk"}, "item": "foundation-esxi-03"}
```
2016-02-05 15:04:04 -05:00
Joseph Callen
3ce496c646 missing doc fragment 2016-02-05 14:56:39 -05:00
Joseph Callen
0740753255 Resolves issue with vmware_vm_vss_dvs_migrate module for v2.0
When this module was written back in May 2015 we were using 1.9.x. Being lazy I added to param the objects that the other functions would need. What I have noticed is in 2.0 exit_json is trying to jsonify those complex objects and failing. This PR resolves that issue with the vmware_vm_vss_dvs_migrate module.

@kamsz reported this issue in https://github.com/ansible/ansible-modules-extras/pull/1568

Playbook
```
- name: Migrate VCSA to vDS
      local_action:
        module: vmware_vm_vss_dvs_migrate
        hostname: "{{ mgmt_ip_address }}"
        username: "{{ vcsa_user }}"
        password: "{{ vcsa_pass }}"
        vm_name: "{{ hostname }}"
        dvportgroup_name: Management
```

Module Testing
```
ASK [Migrate VCSA to vDS] *****************************************************
task path: /opt/autodeploy/projects/emmet/site_deploy.yml:260
ESTABLISH LOCAL CONNECTION FOR USER: root
localhost EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1454695546.3-207189190861859 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1454695546.3-207189190861859 )" )
localhost PUT /tmp/tmpkzD4pF TO /root/.ansible/tmp/ansible-tmp-1454695546.3-207189190861859/vmware_vm_vss_dvs_migrate
localhost EXEC LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1454695546.3-207189190861859/vmware_vm_vss_dvs_migrate; rm -rf "/root/.ansible/tmp/ansible-tmp-1454695546.3-207189190861859/" > /dev/null 2>&1
changed: [foundation-vcsa -> localhost] => {"changed": true, "invocation": {"module_args": {"dvportgroup_name": "Management", "hostname": "172.27.0.100", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "username": "root", "vm_name": "cscvcatmp001"}, "module_name": "vmware_vm_vss_dvs_migrate"}, "result": null}

```
2016-02-05 14:53:36 -05:00
Joseph Callen
49cfd24ad8 Resolves issue with vmware_host module for v2.0
When this module was written back in May 2015 we were using 1.9.x. Being lazy I added to param the objects that the other functions would need. What I have noticed is in 2.0 exit_json is trying to jsonify those complex objects and failing. This PR resolves that issue with the vmware_host module.

@kamsz reported this issue in https://github.com/ansible/ansible-modules-extras/pull/1568

Playbook
```
    - name: Add Host
      local_action:
        module: vmware_host
        hostname: "{{ mgmt_ip_address }}"
        username: "{{ vcsa_user }}"
        password: "{{ vcsa_pass }}"
        datacenter_name: "{{ mgmt_vdc }}"
        cluster_name: "{{ mgmt_cluster }}"
        esxi_hostname: "{{ hostvars[item].hostname }}"
        esxi_username: "{{ esxi_username }}"
        esxi_password: "{{ site_passwd }}"
        state: present
      with_items: groups['foundation_esxi']
```

Module Testing
```
TASK [Add Host] ****************************************************************
task path: /opt/autodeploy/projects/emmet/site_deploy.yml:214
ESTABLISH LOCAL CONNECTION FOR USER: root
localhost EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1454693866.1-87710459703937 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1454693866.1-87710459703937 )" )
localhost PUT /tmp/tmppmr9i9 TO /root/.ansible/tmp/ansible-tmp-1454693866.1-87710459703937/vmware_host
localhost EXEC LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1454693866.1-87710459703937/vmware_host; rm -rf "/root/.ansible/tmp/ansible-tmp-1454693866.1-87710459703937/" > /dev/null 2>&1
localhost EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1454693943.8-75870536677834 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1454693943.8-75870536677834 )" )
localhost PUT /tmp/tmpVB81f2 TO /root/.ansible/tmp/ansible-tmp-1454693943.8-75870536677834/vmware_host
localhost EXEC LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1454693943.8-75870536677834/vmware_host; rm -rf "/root/.ansible/tmp/ansible-tmp-1454693943.8-75870536677834/" > /dev/null 2>&1
localhost EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1454693991.56-163414752982563 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1454693991.56-163414752982563 )" )
localhost PUT /tmp/tmpFB7VQB TO /root/.ansible/tmp/ansible-tmp-1454693991.56-163414752982563/vmware_host
localhost EXEC LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1454693991.56-163414752982563/vmware_host; rm -rf "/root/.ansible/tmp/ansible-tmp-1454693991.56-163414752982563/" > /dev/null 2>&1
changed: [foundation-vcsa -> localhost] => (item=foundation-esxi-01) => {"changed": true, "invocation": {"module_args": {"cluster_name": "Foundation", "datacenter_name": "Test-Lab", "esxi_hostname": "cscesxtmp001", "esxi_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "esxi_username": "root", "hostname": "172.27.0.100", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "state": "present", "username": "root"}, "module_name": "vmware_host"}, "item": "foundation-esxi-01", "result": "'vim.HostSystem:host-15'"}
changed: [foundation-vcsa -> localhost] => (item=foundation-esxi-02) => {"changed": true, "invocation": {"module_args": {"cluster_name": "Foundation", "datacenter_name": "Test-Lab", "esxi_hostname": "cscesxtmp002", "esxi_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "esxi_username": "root", "hostname": "172.27.0.100", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "state": "present", "username": "root"}, "module_name": "vmware_host"}, "item": "foundation-esxi-02", "result": "'vim.HostSystem:host-20'"}
changed: [foundation-vcsa -> localhost] => (item=foundation-esxi-03) => {"changed": true, "invocation": {"module_args": {"cluster_name": "Foundation", "datacenter_name": "Test-Lab", "esxi_hostname": "cscesxtmp003", "esxi_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "esxi_username": "root", "hostname": "172.27.0.100", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "state": "present", "username": "root"}, "module_name": "vmware_host"}, "item": "foundation-esxi-03", "result": "'vim.HostSystem:host-21'"}

```
2016-02-05 14:48:12 -05:00
Joseph Callen
56559ebc35 Resolves issue with vmware_dvs_host module for v2.0
When this module was written back in May 2015 we were using 1.9.x. Being lazy I added to param the objects that the other functions would need. What I have noticed is in 2.0 exit_json is trying to jsonify those complex objects and failing. This PR resolves that issue with the vmware_dvs_host module.

@kamsz reported this issue in https://github.com/ansible/ansible-modules-extras/pull/1568

Playbook
```
- name: Add Host to dVS
      local_action:
        module: vmware_dvs_host
        hostname: "{{ mgmt_ip_address }}"
        username: "{{ vcsa_user }}"
        password: "{{ vcsa_pass }}"
        esxi_hostname: "{{ hostvars[item].hostname }}"
        switch_name: dvSwitch
        vmnics: "{{ dvs_vmnic }}"
        state: present
      with_items: groups['foundation_esxi']
```
Module Testing
```
TASK [Add Host to dVS] *********************************************************
task path: /opt/autodeploy/projects/emmet/site_deploy.yml:234
ESTABLISH LOCAL CONNECTION FOR USER: root
localhost EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1454694039.6-259977654985844 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1454694039.6-259977654985844 )" )
localhost PUT /tmp/tmpGrHqbd TO /root/.ansible/tmp/ansible-tmp-1454694039.6-259977654985844/vmware_dvs_host
localhost EXEC LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1454694039.6-259977654985844/vmware_dvs_host; rm -rf "/root/.ansible/tmp/ansible-tmp-1454694039.6-259977654985844/" > /dev/null 2>&1
localhost EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1454694058.76-121920794239796 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1454694058.76-121920794239796 )" )
localhost PUT /tmp/tmpkP7DPu TO /root/.ansible/tmp/ansible-tmp-1454694058.76-121920794239796/vmware_dvs_host
localhost EXEC LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1454694058.76-121920794239796/vmware_dvs_host; rm -rf "/root/.ansible/tmp/ansible-tmp-1454694058.76-121920794239796/" > /dev/null 2>&1
localhost EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1454694090.2-33641188152663 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1454694090.2-33641188152663 )" )
localhost PUT /tmp/tmp216NwV TO /root/.ansible/tmp/ansible-tmp-1454694090.2-33641188152663/vmware_dvs_host
localhost EXEC LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1454694090.2-33641188152663/vmware_dvs_host; rm -rf "/root/.ansible/tmp/ansible-tmp-1454694090.2-33641188152663/" > /dev/null 2>&1
changed: [foundation-vcsa -> localhost] => (item=foundation-esxi-01) => {"changed": true, "invocation": {"module_args": {"esxi_hostname": "cscesxtmp001", "hostname": "172.27.0.100", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "state": "present", "switch_name": "dvSwitch", "username": "root", "vmnics": ["vmnic2"]}, "module_name": "vmware_dvs_host"}, "item": "foundation-esxi-01", "result": "None"}
changed: [foundation-vcsa -> localhost] => (item=foundation-esxi-02) => {"changed": true, "invocation": {"module_args": {"esxi_hostname": "cscesxtmp002", "hostname": "172.27.0.100", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "state": "present", "switch_name": "dvSwitch", "username": "root", "vmnics": ["vmnic2"]}, "module_name": "vmware_dvs_host"}, "item": "foundation-esxi-02", "result": "None"}
changed: [foundation-vcsa -> localhost] => (item=foundation-esxi-03) => {"changed": true, "invocation": {"module_args": {"esxi_hostname": "cscesxtmp003", "hostname": "172.27.0.100", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "state": "present", "switch_name": "dvSwitch", "username": "root", "vmnics": ["vmnic2"]}, "module_name": "vmware_dvs_host"}, "item": "foundation-esxi-03", "result": "None"}
```
2016-02-05 14:39:55 -05:00
Joseph Callen
56c1ce3df1 Resolves issue with vmware_dvs_portgroup module for v2.0
When this module was written back in May 2015 we were using 1.9.x. Being lazy I added to param the objects that the other functions would need. What I have noticed is in 2.0 exit_json is trying to jsonify those complex objects and failing. This PR resolves that issue with the vmware_dvs_portgroup module.

@kamsz reported this issue in https://github.com/ansible/ansible-modules-extras/pull/1568

Playbook
```
- name: Create Management portgroup
      local_action:
        module: vmware_dvs_portgroup
        hostname: "{{ mgmt_ip_address }}"
        username: "{{ vcsa_user }}"
        password: "{{ vcsa_pass }}"
        portgroup_name: Management
        switch_name: dvSwitch
        vlan_id: "{{ hostvars[groups['foundation_esxi'][0]].mgmt_vlan_id }}"
        num_ports: 120
        portgroup_type: earlyBinding
        state: present
```

Module Testing
```
TASK [Create Management portgroup] *********************************************
task path: /opt/autodeploy/projects/emmet/tasks/deploy/dvs_network.yml:17
ESTABLISH LOCAL CONNECTION FOR USER: root
localhost EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1454693809.13-142252676354410 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1454693809.13-142252676354410 )" )
localhost PUT /tmp/tmpeQ8M1U TO /root/.ansible/tmp/ansible-tmp-1454693809.13-142252676354410/vmware_dvs_portgroup
localhost EXEC LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1454693809.13-142252676354410/vmware_dvs_portgroup; rm -rf "/root/.ansible/tmp/ansible-tmp-1454693809.13-142252676354410/" > /dev/null 2>&1
changed: [foundation-vcsa -> localhost] => {"changed": true, "invocation": {"module_args": {"hostname": "172.27.0.100", "num_ports": 120, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "portgroup_name": "Management", "portgroup_type": "earlyBinding", "state": "present", "switch_name": "dvSwitch", "username": "root", "vlan_id": 2700}, "module_name": "vmware_dvs_portgroup"}, "result": "None"}
```
2016-02-05 14:31:20 -05:00
Joseph Callen
9093c02446 Resolves issue with vmware_dvswitch module for v2.0
When this module was written back in May 2015 we were using 1.9.x. Being lazy I added to param the objects that the other functions would need. What I have noticed is in 2.0 exit_json is trying to jsonify those complex objects and failing. This PR resolves that issue with the vmware_dvswitch module.

@kamsz reported this issue in https://github.com/ansible/ansible-modules-extras/pull/1568

Playbook
```
- name: Create dvswitch
      local_action:
        module: vmware_dvswitch
        hostname: "{{ mgmt_ip_address }}"
        username: "{{ vcsa_user }}"
        password: "{{ vcsa_pass }}"
        datacenter_name: "{{ mgmt_vdc }}"
        switch_name: dvSwitch
        mtu: 1500
        uplink_quantity: 2
        discovery_proto: lldp
        discovery_operation: both
        state: present
```
Module Testing
```
TASK [Create dvswitch] *********************************************************
task path: /opt/autodeploy/projects/emmet/tasks/deploy/dvs_network.yml:3
ESTABLISH LOCAL CONNECTION FOR USER: root
localhost EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1454693792.01-113207408596014 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1454693792.01-113207408596014 )" )
localhost PUT /tmp/tmptb3e2c TO /root/.ansible/tmp/ansible-tmp-1454693792.01-113207408596014/vmware_dvswitch
localhost EXEC LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1454693792.01-113207408596014/vmware_dvswitch; rm -rf "/root/.ansible/tmp/ansible-tmp-1454693792.01-113207408596014/" > /dev/null 2>&1
changed: [foundation-vcsa -> localhost] => {"changed": true, "invocation": {"module_args": {"datacenter_name": "Test-Lab", "discovery_operation": "both", "discovery_proto": "lldp", "hostname": "172.27.0.100", "mtu": 1500, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "state": "present", "switch_name": "dvSwitch", "uplink_quantity": 2, "username": "root"}, "module_name": "vmware_dvswitch"}, "result": "'vim.dvs.VmwareDistributedVirtualSwitch:dvs-9'"}
```
2016-02-05 14:25:47 -05:00
Joseph Callen
df7e3b081e Resolves issue with vmware_cluster module for v2.0
When this module was written back in May 2015 we were using 1.9.x. Being lazy I added to param the objects that the other functions would need. What I have noticed is in 2.0 exit_json is trying to jsonify those complex objects and failing. This PR resolves that issue with the vmware_cluster module.

@kamsz reported this issue in https://github.com/ansible/ansible-modules-extras/pull/1568

Playbook
```
    - name: Create Cluster
      local_action:
        module: vmware_cluster
        hostname: "{{ mgmt_ip_address }}"
        username: "{{ vcsa_user }}"
        password: "{{ vcsa_pass }}"
        datacenter_name: "{{ mgmt_vdc }}"
        cluster_name: "{{ mgmt_cluster }}"
        enable_ha: True
        enable_drs: True
        enable_vsan: True
```

Module testing
```
TASK [Create Cluster] **********************************************************
task path: /opt/autodeploy/projects/emmet/site_deploy.yml:188
ESTABLISH LOCAL CONNECTION FOR USER: root
localhost EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1454693788.92-14097560271233 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1454693788.92-14097560271233 )" )
localhost PUT /tmp/tmpAJfdPb TO /root/.ansible/tmp/ansible-tmp-1454693788.92-14097560271233/vmware_cluster
localhost EXEC LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1454693788.92-14097560271233/vmware_cluster; rm -rf "/root/.ansible/tmp/ansible-tmp-1454693788.92-14097560271233/" > /dev/null 2>&1
changed: [foundation-vcsa -> localhost] => {"changed": true, "invocation": {"module_args": {"cluster_name": "Foundation", "datacenter_name": "Test-Lab", "enable_drs": true, "enable_ha": true, "enable_vsan": true, "hostname": "172.27.0.100", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "state": "present", "username": "root"}, "module_name": "vmware_cluster"}}
```
2016-02-05 14:14:25 -05:00
Daniel Petty
a1c2cb0a2e Fix indent 2016-02-03 14:36:04 -07:00
Joseph Callen
37d36a5533 Fixed documentation 2016-02-01 11:35:02 -05:00