mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07: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:
parent
9ed0a5a920
commit
79f98bffcf
2 changed files with 27 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue