Closed liamwh closed 2 years ago
Files identified in the description: None
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
Since you say you've seen a reconfigure task in vCenter, I guess you didn't run ansible in check mode, correct? What happens if you run this a second (and maybe even a third) time? Do you still see changes?
Since you say you've seen a reconfigure task in vCenter, I guess you didn't run ansible in check mode, correct? What happens if you run this a second (and maybe even a third) time? Do you still see changes?
Yes, that is my exact point. The portgroup configuration is configured exactly as defined, however each playbook run, a reconfigure task is created in vCenter, as well as Ansible returning a changed state. Indeed, check mode is not being used here.
Could you please define the port_allocation
("elastic" in you case) and try again? I think this happens when it's undefined but I'm not sure.
Could you please define the
port_allocation
("elastic" in you case) and try again? I think this happens when it's undefined but I'm not sure.
@liamwh Did you find the time yet to test port_allocation: elastic
? Your answer might help me a lot to fix this.
Hi, I had this issue too, and explicitly specifying port_allocation: elastic
resolved it.
By the way, the exact same thing happens when specifying network_policy
.
@mariolenz apologies for the delay! Indeed specifying port_allocation: elastic
solved the issue.
I'm trying to fix this. Would it be possible for you to test PR #1150?
@mariolenz apologies for the delay! Indeed specifying
port_allocation: elastic
solved the issue.
Closing as per above comment. Should be fixed in 2.x (I hope).
SUMMARY
vmware_dvs_portgroup is not idempotent and ansible is trigging a reconfigure task in vCenter.
ISSUE TYPE
COMPONENT NAME
community.vmware.vmware_dvs_portgroup
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Running Ansible from rhel8
vSphere Client version 7.0.2.00500
STEPS TO REPRODUCE
EXPECTED RESULTS
changed should be false and no task should be run on the vCenter if the portgroup configuration is already correct.
ACTUAL RESULTS
Status was changed, a task on vCenter was performed, but the state was already correct and no action needed to be taken.