mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #27575 from rallytime/fix-27532
Don't report existing instances as running only if they're actually terminated in EC2
This commit is contained in:
commit
1a31b19f15
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 = 'Instance already exists, 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