-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update vmware_guest.py docs #2272
Update vmware_guest.py docs #2272
Conversation
Build failed. ✔️ ansible-tox-linters SUCCESS in 4m 40s |
recheck |
Build failed. ✔️ ansible-tox-linters SUCCESS in 5m 02s |
recheck |
Build failed. ✔️ ansible-tox-linters SUCCESS in 4m 51s |
recheck |
Build succeeded. ✔️ ansible-tox-linters SUCCESS in 4m 29s |
I'm sorry, I didn't find much time to work on this collection during the last weeks. I hope I'm able to review this PR soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @danielkucera! But I think you're wrong in saying that those options are both simply optional. It looks like you need at least one of them:
community.vmware/plugins/modules/vmware_guest.py
Lines 1816 to 1818 in 9b138fe
if 'name' not in network and 'vlan' not in network: | |
self.module.fail_json(msg="Please specify at least a network name or" | |
" a VLAN name under VM network list.") |
I suggest to make this clear. Feel free to improve my wording if you don't like it :-)
Co-authored-by: Mario Lenz <[email protected]>
Co-authored-by: Mario Lenz <[email protected]>
Build succeeded. ✔️ ansible-tox-linters SUCCESS in 5m 01s |
Build succeeded (gate pipeline). ✔️ ansible-tox-linters SUCCESS in 5m 22s |
6491d02
into
ansible-collections:main
SUMMARY Only one of name or vlan is in fact required. ISSUE TYPE Docs Pull Request COMPONENT NAME vmware_guest ADDITIONAL INFORMATION Backport of #2272
SUMMARY
None of
name
orvlan
is in fact required. For correct operation either one can be specified.ISSUE TYPE
COMPONENT NAME
vmware_guest
ADDITIONAL INFORMATION
This cost us about 2 hours of debugging because we thought that vlan is required. When we specified both name and vlan, another network was picked than we specified in name because vlan takes precedence and there was another network available with the same vlan id.
This PR might be worth backporting to all version where this applies.
Relevant code section:
community.vmware/plugins/modules/vmware_guest.py
Lines 1811 to 1812 in e249a03