You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The community.general.one_host module fails when allocating the first host (ID: 0) in OpenNebula.
It also fails when updating the template/attributes of the host with an ID of 0.
This occurs even though it appears the host has been allocated or updated successfully in OpenNebula.
I think the problem is that the allocate() and update() functions used on lines 141 and 254 of one_host.py return the ID of the OpenNebula host allocated or updated. The result of these function calls is checked by an if statement, and if the result is 0 then self.fail() is called. Therefore, when updating or allocating the host with an ID of 0 in OpenNebula, ansible needlessly fails when it was actually successful.
SUMMARY
The community.general.one_host module fails when allocating the first host (ID: 0) in OpenNebula.
It also fails when updating the template/attributes of the host with an ID of 0.
This occurs even though it appears the host has been allocated or updated successfully in OpenNebula.
I think the problem is that the
allocate()
andupdate()
functions used on lines 141 and 254 ofone_host.py
return the ID of the OpenNebula host allocated or updated. The result of these function calls is checked by an if statement, and if the result is0
thenself.fail()
is called. Therefore, when updating or allocating the host with an ID of 0 in OpenNebula, ansible needlessly fails when it was actually successful.ISSUE TYPE
COMPONENT NAME
one_host
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
OS: Debian 10
Collection: community.general shipped with ansible 2.10
Packages:
STEPS TO REPRODUCE
Setup environment:
Steps:
EXPECTED RESULTS
First play:
Second play:
ACTUAL RESULTS
First play:
Second play:
Third play:
The text was updated successfully, but these errors were encountered: