mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Adding start and stop actions to os_server_actions
Also making the os_server module allow a server in the possible new states from the os_server_actions changes
This commit is contained in:
@@ -368,7 +368,7 @@ def _get_server_state(module, cloud):
|
||||
state = module.params['state']
|
||||
server = cloud.get_server(module.params['name'])
|
||||
if server and state == 'present':
|
||||
if server.status != 'ACTIVE':
|
||||
if server.status not in ('ACTIVE', 'SHUTOFF', 'PAUSED', 'SUSPENDED'):
|
||||
module.fail_json(
|
||||
msg="The instance is available but not Active state: "
|
||||
+ server.status)
|
||||
|
||||
Reference in New Issue
Block a user