diff --git a/test/runner/lib/cloud/vcenter.py b/test/runner/lib/cloud/vcenter.py index 3515cbb59b..5e80f6462f 100644 --- a/test/runner/lib/cloud/vcenter.py +++ b/test/runner/lib/cloud/vcenter.py @@ -40,7 +40,10 @@ class VcenterProvider(CloudProvider): super(VcenterProvider, self).__init__(args, config_extension='.ini') # The simulator must be pinned to a specific version to guarantee CI passes with the version used. - self.image = 'ansible/ansible:vcenter-simulator@sha256:1a92e84f477ae4c45f9070a5419a0fc2b46abaecdb5bc396826741bca65ce028' + if os.environ.get('ANSIBLE_VCSIM_CONTAINER'): + self.image = os.environ.get('ANSIBLE_VCSIM_CONTAINER') + else: + self.image = 'ansible/ansible:vcenter-simulator@sha256:1a92e84f477ae4c45f9070a5419a0fc2b46abaecdb5bc396826741bca65ce028' self.container_name = '' def filter(self, targets, exclude): @@ -118,7 +121,9 @@ class VcenterProvider(CloudProvider): else: publish_ports = [] - docker_pull(self.args, self.image) + if not os.environ.get('ANSIBLE_VCSIM_CONTAINER'): + docker_pull(self.args, self.image) + docker_run( self.args, self.image,