From 25ad4882b0d9d2f079762be0a167ee94b7ab264f Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Wed, 29 Apr 2020 14:52:49 -0600 Subject: [PATCH] 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 --- plugins/modules/os_server_action.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/os_server_action.py b/plugins/modules/os_server_action.py index 9c04b64e..c2aab8cf 100644 --- a/plugins/modules/os_server_action.py +++ b/plugins/modules/os_server_action.py @@ -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)