Repository: openshift/openshift-ansible

Issue:
docker_image_availability check fails, repo url divided into single character urls
#### Description

Looks to be a tokenizing error in the `docker_image_availability` check
```
Failure summary:


  1. Hosts:    infra.lab.variantweb.net, master.lab.variantweb.net, node1.lab.variantweb.net
     Play:     Verify Requirements
     Task:     openshift_health_check
     Message:  One or more checks failed
     Details:  check "docker_image_availability":
               One or more required Docker images are not available:
                   openshift3/ose-deployer:v3.7.0-0.127.0,
                   openshift3/ose-docker-registry:v3.7.0-0.127.0,
                   openshift3/ose-haproxy-router:v3.7.0-0.127.0,
                   openshift3/ose-pod:v3.7.0-0.127.0
               Configured registries: r (unreachable), e (unreachable), g (unreachable), i (unreachable), s (unreachable), t (unreachable), r (unreachable), y (unreachable), . (unreachable), o (unreachable), p (unreachable), s (unreachable), . (unreachable), o (unreachable), p (unreachable), e (unreachable), n (unreachable), s (unreachable), h (unreachable), i (unreachable), f (unreachable), t (unreachable), . (unreachable), c (unreachable), o (unreachable), m (unreachable), registry.access.redhat.com
               Checked by: timeout 10 skopeo inspect --tls-verify=false docker://{registry}/{image}
```

##### Version

```
$ ansible --version
ansible 2.3.2.0
  config file = /home/sjennings/projects/go/src/github.com/openshift/openshift-ansible/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.13 (default, Jun 26 2017, 10:20:05) [GCC 7.1.1 20170622 (Red Hat 7.1.1-3)]

$ git describe
openshift-ansible-3.7.0-0.135.0-10-g62cb2a8d5
```

##### Steps To Reproduce
1. run playbook/byo/config.yml
2. playbook fails with above error

##### Expected Results
Installation check succeeds and each character of the `openshift_docker_additional_registries` is not treated as an individual repo url.

@sdodson 


Discussion:
I believe the error was introduced here
https://github.com/openshift/openshift-ansible/pull/5559/files#diff-f6d4c415edd5332159aa1c77eb72b757R156
/assign mtnbikenc

Resolving patch:
diff --git a/roles/openshift_health_checker/openshift_checks/docker_image_availability.py b/roles/openshift_health_checker/openshift_checks/docker_image_availability.py
--- a/roles/openshift_health_checker/openshift_checks/docker_image_availability.py
+++ b/roles/openshift_health_checker/openshift_checks/docker_image_availability.py
@@ -1,5 +1,6 @@
 """Check that required Docker images are available."""
 
+from ansible.module_utils import six
 from openshift_checks import OpenShiftCheck
 from openshift_checks.mixins import DockerHostMixin
 
@@ -153,7 +154,15 @@ def is_image_local(self, image):
 
     def known_docker_registries(self):
         """Build a list of docker registries available according to inventory vars."""
-        regs = list(self.get_var("openshift_docker_additional_registries", default=[]))
+        regs = self.get_var("openshift_docker_additional_registries", default=[])
+        # https://bugzilla.redhat.com/show_bug.cgi?id=1497274
+        # if the result was a string type, place it into a list. We must do this
+        # as using list() on a string will split the string into its characters.
+        if isinstance(regs, six.string_types):
+            regs = [regs]
+        else:
+            # Otherwise cast to a list as was done previously
+            regs = list(regs)
 
         deployment_type = self.get_var("openshift_deployment_type")
         if deployment_type == "origin" and "docker.io" not in regs:


Test patch: