Closed APolts closed 3 years ago
ANSIBLE VERSION
config file = /etc/ansible/ansible.cfg configured module search path = ['/home/ubuntu/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible executable location = /usr/local/bin/ansible python version = 3.8.5 (default, Jan 27 2021, 15:41:15) [GCC 9.3.0]
You're ansible version doesn't contain... the version of ansible you're using :-P
This looks a bit like a duplicate of #703 which should have been fixed with #705. Does the problem still exist with a current version of ansible / this collection?
My apologies - I was using version 2.10.8.
I updated to the most recent version of this collection and the bug is no longer present. Thank you!
SUMMARY
When using vmware_guest.py, supplying values of 0 for disk:controller_number and disk:unit_number causes the playbook to erroneously trip an if statement on line 2481, as values of 0 pass the conditional of (if not).
ISSUE TYPE
COMPONENT NAME
vmware_guest
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Ubuntu 20.04.1 LTS VSphere Client Version 6.7.0.46000
STEPS TO REPRODUCE
Supply values of 0 for disk.controller_number and disk.unit_number.
This error is reproducible both when hard-coding values for unit_number and disk_number and when fetching them with vmware.vmware_guest_disk_info.
EXPECTED RESULTS
Commenting out lines 2481 and 2482 results in the playbook performing without issue.
ACTUAL RESULTS
The playbook errors out, telling the user that unit_number, controller_number and controller_type are required parameters.
Ran in verbose mode: