mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-05-06 13:23:06 +00:00
os_server_action: pass imageRef to rebuild
Prior to this change, the os_server_action module could not rebuild servers, because it passed no arguments to the "rebuild" object. The imageRef parameter is mandatory. If the client does not specify imageRef, Nova takes no action to rebuild the server. Change-Id: I0edbdb634feb90d4c54476a4089fcb014c0b83b2
This commit is contained in:
@@ -233,7 +233,7 @@ def main():
|
||||
# rebuild doesn't set a state, just do it
|
||||
cloud.compute.post(
|
||||
_action_url(server.id),
|
||||
json={'rebuild': None})
|
||||
json={'rebuild': {'imageRef': image.id}})
|
||||
if wait:
|
||||
_wait(timeout, cloud, server, action, module, sdk)
|
||||
module.exit_json(changed=True)
|
||||
|
||||
Reference in New Issue
Block a user