Browse Source

Disable TLS verification in skopeo inspect

Some registries are not configured with valid certificates and thus the
check fails with 'http: server gave HTTP response to HTTPS client'.
Since this is not fetching images, but only checking for existence,
trade security for convenience.
Rodolfo Carvalho 8 years ago
parent
commit
c250e0cd02

+ 1 - 1
roles/openshift_health_checker/openshift_checks/docker_image_availability.py

@@ -169,7 +169,7 @@ class DockerImageAvailability(DockerHostMixin, OpenShiftCheck):
             registries = [registry]
 
         for registry in registries:
-            args = {"_raw_params": "skopeo inspect docker://{}/{}".format(registry, image)}
+            args = {"_raw_params": "skopeo inspect --tls-verify=false docker://{}/{}".format(registry, image)}
             result = self.execute_module("command", args, task_vars=task_vars)
             if result.get("rc", 0) == 0 and not result.get("failed"):
                 return True