No description
Find a file
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
cloud Resolves issue with vmware_host module for v2.0 2016-02-05 14:48:12 -05:00
clustering Update for modules which import json. 2016-01-11 13:06:22 -08:00
commands Add functionality to give multiple iterative responses for a question in expect 2016-01-19 14:33:05 -06:00
database Update for modules which import json. 2016-01-11 13:06:22 -08:00
files Update 'patch' documentation for src, remote_src, backup and binary. 2015-11-27 00:24:08 +00:00
messaging Merge pull request #831 from viruxel/devel 2016-02-01 23:36:36 -05:00
monitoring added missing verison_added 2016-02-01 23:56:58 -05:00
network Fixes missing validate_certs parameter 2016-02-01 16:27:09 -08:00
notification Remove duplicate documentation fields 2016-01-28 09:20:55 -08:00
packaging Merge pull request #1415 from jtyr/jtyr-yumrepo_params 2016-02-02 13:53:39 -08:00
source_control Update for modules which import json. 2016-01-11 13:06:22 -08:00
system Merge pull request #1378 from johanwiren/fix_properties_handling 2016-02-02 13:02:43 -08:00
web_infrastructure Trick ansible-modules-validate to pass this with no RETURN. 2016-01-12 11:25:56 -08:00
windows Merge pull request #1111 from h0nIg/devel 2016-02-01 23:45:26 -05:00
.gitignore Add basic top level files. 2014-09-26 09:21:20 -04:00
.travis.yml Update .travis.yml to remove the validation exclusion for route53_zone 2015-12-23 11:10:48 -06:00
__init__.py package files 2014-09-26 11:04:10 -04:00
CONTRIBUTING.md Add new policy guidelines for Extras 2015-06-16 11:33:13 -04:00
COPYING Add basic top level files. 2014-09-26 09:21:20 -04:00
README.md added installation info .. that you don't need to 2015-03-10 10:36:00 -04:00
REVIEWERS.md Add new SMEs for Zabbix 2015-11-03 15:48:58 -05:00
test-docs.sh Add testing documentation to travis 2015-06-29 13:09:58 -07:00
VERSION Version bump for new beta 2.0.0-0.5.beta3 2015-11-13 16:47:22 -05:00

ansible-modules-extras

This repo contains a subset of ansible-modules with slightly lower use or priority than "core" modules.

All new modules should be submitted here, and have a chance to be promoted to core over time.

Reporting bugs

Take care to submit tickets to the appropriate repo where modules are contained. The repo is mentioned at the bottom of module documentation page at docs.ansible.com.

Testing modules

Ansible module development guide contains the latest info about that.

License

As with Ansible, modules distributed with Ansible are GPLv3 licensed. User generated modules not part of this project can be of any license.

Installation

There should be no need to install this repo separately as it should be included in any Ansible install using the official documented methods.