mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03:30
Fix issue AC-935... make sure we exclude certain regions by default. cn-north-1 was added to our dependency 'boto' here: https://github.com/boto/boto/pull/1939/files but is inaccessible from outside of China
This commit is contained in:
parent
a103528967
commit
b9cde9cc42
@ -772,8 +772,9 @@ class RunInventoryUpdate(BaseTask):
|
||||
ec2_opts = dict(inventory_source.source_vars_dict.items())
|
||||
regions = inventory_source.source_regions or 'all'
|
||||
regions = ','.join([x.strip() for x in regions.split(',')])
|
||||
regions_blacklist = ','.join(settings.EC2_REGIONS_BLACKLIST)
|
||||
ec2_opts['regions'] = regions
|
||||
ec2_opts.setdefault('regions_exclude', 'us-gov-west-1')
|
||||
ec2_opts.setdefault('regions_exclude', regions_blacklist)
|
||||
ec2_opts.setdefault('destination_variable', 'public_dns_name')
|
||||
ec2_opts.setdefault('vpc_destination_variable', 'ip_address')
|
||||
ec2_opts.setdefault('route53', 'False')
|
||||
|
||||
@ -325,6 +325,11 @@ EC2_REGION_NAMES = {
|
||||
'us-gov-west-1': 'US West (GovCloud)',
|
||||
}
|
||||
|
||||
EC2_REGIONS_BLACKLIST = [
|
||||
'us-gov-west-1',
|
||||
'cn-north-1',
|
||||
]
|
||||
|
||||
# Internal API URL for use by inventory scripts and callback plugin.
|
||||
if 'devserver' in INSTALLED_APPS:
|
||||
INTERNAL_API_URL = 'http://127.0.0.1:%s' % DEVSERVER_DEFAULT_PORT
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user