mirror of https://github.com/ansible/ansible.git
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.
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 | |
|---|---|---|
| .. | ||
| __init__.py | 11 years ago | |
| vca_fw.py | 10 years ago | |
| vca_nat.py | 10 years ago | |
| vca_vapp.py | 10 years ago | |
| vmware_cluster.py | 10 years ago | |
| vmware_datacenter.py | 10 years ago | |
| vmware_dns_config.py | 10 years ago | |
| vmware_dvs_host.py | 10 years ago | |
| vmware_dvs_portgroup.py | 10 years ago | |
| vmware_dvswitch.py | 10 years ago | |
| vmware_host.py | 10 years ago | |
| vmware_migrate_vmk.py | 10 years ago | |
| vmware_portgroup.py | 10 years ago | |
| vmware_target_canonical_facts.py | 10 years ago | |
| vmware_vm_facts.py | 10 years ago | |
| vmware_vm_shell.py | 10 years ago | |
| vmware_vm_vss_dvs_migrate.py | 10 years ago | |
| vmware_vmkernel.py | 10 years ago | |
| vmware_vmkernel_ip_config.py | 10 years ago | |
| vmware_vsan_cluster.py | 10 years ago | |
| vmware_vswitch.py | 10 years ago | |
| vsphere_copy.py | 10 years ago | |