mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Little improvement in the organization of the configuration loader method
This commit is contained in:
parent
bc80bd36af
commit
50b320615e
1 changed files with 3 additions and 1 deletions
|
@ -238,11 +238,13 @@ class Ec2Inventory(object):
|
||||||
if config.has_option('ec2', 'elasticache'):
|
if config.has_option('ec2', 'elasticache'):
|
||||||
self.elasticache_enabled = config.getboolean('ec2', 'elasticache')
|
self.elasticache_enabled = config.getboolean('ec2', 'elasticache')
|
||||||
|
|
||||||
# Return all EC2 and RDS instances (if RDS is enabled)
|
# Return all EC2 instances?
|
||||||
if config.has_option('ec2', 'all_instances'):
|
if config.has_option('ec2', 'all_instances'):
|
||||||
self.all_instances = config.getboolean('ec2', 'all_instances')
|
self.all_instances = config.getboolean('ec2', 'all_instances')
|
||||||
else:
|
else:
|
||||||
self.all_instances = False
|
self.all_instances = False
|
||||||
|
|
||||||
|
# Return all RDS instances? (if RDS is enabled)
|
||||||
if config.has_option('ec2', 'all_rds_instances') and self.rds_enabled:
|
if config.has_option('ec2', 'all_rds_instances') and self.rds_enabled:
|
||||||
self.all_rds_instances = config.getboolean('ec2', 'all_rds_instances')
|
self.all_rds_instances = config.getboolean('ec2', 'all_rds_instances')
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue