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.
56c1ce3df1
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"} ``` |
9 years ago | |
---|---|---|
.. | ||
amazon | 9 years ago | |
centurylink | 9 years ago | |
cloudstack | 9 years ago | |
docker | 9 years ago | |
9 years ago | ||
lxc | 9 years ago | |
misc | 9 years ago | |
openstack | 9 years ago | |
profitbricks | 9 years ago | |
rackspace | 10 years ago | |
vmware | 9 years ago | |
webfaction | 9 years ago | |
__init__.py | 10 years ago | |
xenserver_facts.py | 9 years ago |