You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Go to file
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'"}
```
10 years ago
cloud Resolves issue with vmware_dvswitch module for v2.0 10 years ago
clustering Update for modules which import json. 10 years ago
commands Add functionality to give multiple iterative responses for a question in expect 10 years ago
database Update for modules which import json. 10 years ago
files Update 'patch' documentation for src, remote_src, backup and binary. 10 years ago
messaging Merge pull request #831 from viruxel/devel 10 years ago
monitoring added missing verison_added 10 years ago
network Fixes missing validate_certs parameter 10 years ago
notification Remove duplicate documentation fields 10 years ago
packaging Merge pull request #1415 from jtyr/jtyr-yumrepo_params 10 years ago
source_control Update for modules which import json. 10 years ago
system Merge pull request #1378 from johanwiren/fix_properties_handling 10 years ago
web_infrastructure Trick ansible-modules-validate to pass this with no RETURN. 10 years ago
windows Merge pull request #1111 from h0nIg/devel 10 years ago
.gitignore Add basic top level files. 11 years ago
.travis.yml Update .travis.yml to remove the validation exclusion for route53_zone 10 years ago
CONTRIBUTING.md Add new policy guidelines for Extras 11 years ago
COPYING Add basic top level files. 11 years ago
README.md added installation info .. that you don't need to 11 years ago
REVIEWERS.md Add new SMEs for Zabbix 10 years ago
VERSION Version bump for new beta 2.0.0-0.5.beta3 10 years ago
__init__.py package files 11 years ago
test-docs.sh Add testing documentation to travis 11 years ago

README.md

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.