mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 19:51:08 -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:
@@ -1101,6 +1101,7 @@ class RunInventoryUpdate(BaseTask):
|
|||||||
ec2_opts.setdefault('all_rds_instances', 'False')
|
ec2_opts.setdefault('all_rds_instances', 'False')
|
||||||
ec2_opts.setdefault('rds', 'False')
|
ec2_opts.setdefault('rds', 'False')
|
||||||
ec2_opts.setdefault('nested_groups', 'True')
|
ec2_opts.setdefault('nested_groups', 'True')
|
||||||
|
ec2_opts.setdefault('elasticache', 'False')
|
||||||
if inventory_update.instance_filters:
|
if inventory_update.instance_filters:
|
||||||
ec2_opts.setdefault('instance_filters', 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()]
|
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
|
# that's why we need to call describe directly (it would be called by
|
||||||
# the shorthand method anyway...)
|
# the shorthand method anyway...)
|
||||||
try:
|
try:
|
||||||
conn = elasticache.connect_to_region(region)
|
conn = self.connect_to_aws(elasticache, region)
|
||||||
if conn:
|
if conn:
|
||||||
# show_cache_node_info = True
|
# show_cache_node_info = True
|
||||||
# because we also want nodes' information
|
# 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
|
# that's why we need to call describe directly (it would be called by
|
||||||
# the shorthand method anyway...)
|
# the shorthand method anyway...)
|
||||||
try:
|
try:
|
||||||
conn = elasticache.connect_to_region(region)
|
conn = self.connect_to_aws(elasticache, region)
|
||||||
if conn:
|
if conn:
|
||||||
response = conn.describe_replication_groups()
|
response = conn.describe_replication_groups()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user