diff --git a/buildman/manager/executor.py b/buildman/manager/executor.py index 3e6034f0d..d2e12f009 100644 --- a/buildman/manager/executor.py +++ b/buildman/manager/executor.py @@ -111,9 +111,12 @@ class EC2Executor(BuilderExecutor): @coroutine def start_builder(self, realm, token, build_uuid): region = self.executor_config['EC2_REGION'] - channel = self.executor_config.get('COREOS_CHANNEL', 'stable') - get_ami_callable = partial(self._get_coreos_ami, region, channel) - coreos_ami = yield From(self._loop.run_in_executor(None, get_ami_callable)) + coreos_ami = self.executor_config.get('COREOS_AMI', None) + if coreos_ami is None: + channel = self.executor_config.get('COREOS_CHANNEL', 'stable') + get_ami_callable = partial(self._get_coreos_ami, region, channel) + coreos_ami = yield From(self._loop.run_in_executor(None, get_ami_callable)) + user_data = self.generate_cloud_config(realm, token, channel, self.manager_hostname) logger.debug('Generated cloud config: %s', user_data)