diff --git a/plugins/inventory/ec2.ini b/plugins/inventory/ec2.ini index 90c09df1a7..8a4e711aab 100644 --- a/plugins/inventory/ec2.ini +++ b/plugins/inventory/ec2.ini @@ -38,8 +38,8 @@ vpc_destination_variable = ip_address # Route53, uncomment and set 'route53' to True. route53 = False -# To include RDS instances in inventory, set to True. -rds = False +# To exclude RDS instances from the inventory, uncomment and set to False. +#rds = False # Additionally, you can specify the list of zones to exclude looking up in # 'route53_excluded_zones' as a comma-separated list. diff --git a/plugins/inventory/ec2.py b/plugins/inventory/ec2.py index b6d6765fbe..275e07505d 100755 --- a/plugins/inventory/ec2.py +++ b/plugins/inventory/ec2.py @@ -223,7 +223,9 @@ class Ec2Inventory(object): config.get('ec2', 'route53_excluded_zones', '').split(',')) # RDS - self.rds_enabled = config.getboolean('ec2', 'rds') + self.rds_enabled = True + if config.has_option('ec2', 'rds'): + self.rds_enabled = config.getboolean('ec2', 'rds') # Cache related cache_dir = os.path.expanduser(config.get('ec2', 'cache_path'))