mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Merge pull request #5236 from willthames/ec2_inv_rds_fail_safe
ec2 inventory: Fail EC2 inventory better with restricted EC2 users
This commit is contained in:
@@ -298,6 +298,7 @@ class Ec2Inventory(object):
|
|||||||
for instance in instances:
|
for instance in instances:
|
||||||
self.add_rds_instance(instance, region)
|
self.add_rds_instance(instance, region)
|
||||||
except boto.exception.BotoServerError as e:
|
except boto.exception.BotoServerError as e:
|
||||||
|
if not e.reason == "Forbidden":
|
||||||
print "Looks like AWS RDS is down: "
|
print "Looks like AWS RDS is down: "
|
||||||
print e
|
print e
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user