append AWS region to test instance file (#45877)

(cherry picked from commit 582a4dfa13)
pull/45405/merge
Jordan Borean 6 years ago committed by Matt Clay
parent ffe364dd5d
commit 9b5dd1ead3

@ -95,6 +95,8 @@ class AnsibleCoreCI(object):
self.provider = candidate self.provider = candidate
break break
self.path = os.path.expanduser('~/.ansible/test/instances/%s-%s-%s' % (self.name, self.provider, self.stage))
if self.provider in ('aws', 'azure'): if self.provider in ('aws', 'azure'):
if self.provider != 'aws': if self.provider != 'aws':
self.resource = self.provider self.resource = self.provider
@ -114,6 +116,7 @@ class AnsibleCoreCI(object):
# send all non-Shippable jobs to us-east-1 to reduce api key maintenance # send all non-Shippable jobs to us-east-1 to reduce api key maintenance
region = 'us-east-1' region = 'us-east-1'
self.path = "%s-%s" % (self.path, region)
self.endpoints = AWS_ENDPOINTS[region], self.endpoints = AWS_ENDPOINTS[region],
if self.platform == 'windows': if self.platform == 'windows':
@ -131,8 +134,6 @@ class AnsibleCoreCI(object):
else: else:
raise ApplicationError('Unsupported platform: %s' % platform) raise ApplicationError('Unsupported platform: %s' % platform)
self.path = os.path.expanduser('~/.ansible/test/instances/%s-%s-%s' % (self.name, self.provider, self.stage))
if persist and load and self._load(): if persist and load and self._load():
try: try:
display.info('Checking existing %s/%s instance %s.' % (self.platform, self.version, self.instance_id), display.info('Checking existing %s/%s instance %s.' % (self.platform, self.version, self.instance_id),

Loading…
Cancel
Save