mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't report existing instances as running only if they're actually terminated
Fixes #27532
This commit is contained in:
parent
fd11e0cd95
commit
da6b4b3604
1 changed files with 5 additions and 1 deletions
|
@ -342,7 +342,11 @@ class SaltCloud(parsers.SaltCloudParser):
|
|||
|
||||
if dmap.get('existing', None):
|
||||
for name in dmap['existing']:
|
||||
ret[name] = {'Message': 'Already running'}
|
||||
if 'ec2' in dmap['existing'][name]['provider']:
|
||||
msg = 'Already running, or is terminated and has the same name.'
|
||||
else:
|
||||
msg = 'Already running.'
|
||||
ret[name] = {'Message': msg}
|
||||
|
||||
except (SaltCloudException, Exception) as exc:
|
||||
msg = 'There was a query error: {0}'
|
||||
|
|
Loading…
Add table
Reference in a new issue