Skip to content

Commit

Permalink
Update vmware_guest.py docs (#2272)
Browse files Browse the repository at this point in the history
SUMMARY

None of name or vlan is in fact required. For correct operation either one can be specified.

ISSUE TYPE


Docs Pull Request

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
    
  
  
    

        
          
           self.module.fail_json(msg="Please specify at least a network name or" 
        

        
          
                                     " a VLAN name under VM network list.")

Reviewed-by: Mario Lenz <[email protected]>
  • Loading branch information
danielkucera authored Jan 18, 2025
1 parent 9b138fe commit 6491d02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/modules/vmware_guest.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,13 +526,13 @@
type: str
description:
- Name of the portgroup or distributed virtual portgroup for this interface.
- Required per entry.
- This is required if C(vlan) isn't defined.
- When specifying distributed virtual portgroup make sure given O(esxi_hostname) or O(cluster) is associated with it.
vlan:
type: int
description:
- VLAN number for this interface.
- Required per entry.
- This is required if C(name) isn't defined.
device_type:
type: str
description:
Expand Down

0 comments on commit 6491d02

Please sign in to comment.