mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
vmware_host: ensure idempotency with state=absent (#54608)
If a host is already missing, `self.host_update` is `None`. With this change,`state_exit_unchanged()` won't try anymore to access `self.host_update.runtime`.
This commit is contained in:
committed by
ansibot
parent
656ca13f65
commit
bda0687d28
@@ -341,7 +341,9 @@ class VMwareHost(PyVmomi):
|
||||
|
||||
def state_exit_unchanged(self):
|
||||
"""Exit with status message"""
|
||||
if self.reconnect_disconnected and self.host_update.runtime.connectionState == 'disconnected':
|
||||
if not self.host_update:
|
||||
result = "Host already disconnected"
|
||||
elif self.reconnect_disconnected and self.host_update.runtime.connectionState == 'disconnected':
|
||||
self.state_reconnect_host()
|
||||
else:
|
||||
if self.folder_name:
|
||||
|
||||
Reference in New Issue
Block a user