mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
Updates for fixes on the core ec2 inventory module
Inventory syncs will still fail if you specify an instance_filter. We need to check: https://github.com/ansible/ansible/pull/13178 For the moment I'm making sure we specifically disable elasticache querying but it still yields an error. Will follow up with: https://trello.com/c/h1U0w4WC/138-ec2-module-is-busted-if-you-set-instance-filters
This commit is contained in:
parent
9733b2e285
commit
3d30ad2db2
@ -1101,6 +1101,7 @@ class RunInventoryUpdate(BaseTask):
|
||||
ec2_opts.setdefault('all_rds_instances', 'False')
|
||||
ec2_opts.setdefault('rds', 'False')
|
||||
ec2_opts.setdefault('nested_groups', 'True')
|
||||
ec2_opts.setdefault('elasticache', 'False')
|
||||
if inventory_update.instance_filters:
|
||||
ec2_opts.setdefault('instance_filters', inventory_update.instance_filters)
|
||||
group_by = [x.strip().lower() for x in inventory_update.group_by.split(',') if x.strip()]
|
||||
|
||||
@ -505,7 +505,7 @@ class Ec2Inventory(object):
|
||||
# that's why we need to call describe directly (it would be called by
|
||||
# the shorthand method anyway...)
|
||||
try:
|
||||
conn = elasticache.connect_to_region(region)
|
||||
conn = self.connect_to_aws(elasticache, region)
|
||||
if conn:
|
||||
# show_cache_node_info = True
|
||||
# because we also want nodes' information
|
||||
@ -541,7 +541,7 @@ class Ec2Inventory(object):
|
||||
# that's why we need to call describe directly (it would be called by
|
||||
# the shorthand method anyway...)
|
||||
try:
|
||||
conn = elasticache.connect_to_region(region)
|
||||
conn = self.connect_to_aws(elasticache, region)
|
||||
if conn:
|
||||
response = conn.describe_replication_groups()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user