summaryrefslogtreecommitdiff
path: root/test/runner
diff options
context:
space:
mode:
authorJames Tanner <tanner.jc@gmail.com>2017-10-16 12:04:45 -0400
committerjctanner <tanner.jc@gmail.com>2017-10-16 21:50:31 -0400
commite5eedfe4b8ee387a779e922f57504cb9c3c2f0fd (patch)
tree8f6df5a9a233929e661ec3480e6b1b04ed835040 /test/runner
parent21cdddce744c56b0a1f844297b3e04b4467b8d64 (diff)
downloadansible-e5eedfe4b8ee387a779e922f57504cb9c3c2f0fd.tar.gz
Allow the user to declare an env var to set the vcsim container image
Diffstat (limited to 'test/runner')
-rw-r--r--test/runner/lib/cloud/vcenter.py9
1 files changed, 7 insertions, 2 deletions
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,