From 84fbacbb0554fcfe425dffd88c83fab96c8c9c2b Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Wed, 11 May 2016 10:55:17 -0300 Subject: Fixes for openshift_docker_hosted_registry_insecure var. Fixes a failure on masters if you explicitly set openshift_docker_hosted_registry_insecure=true. This is the default but if you tried to set it an error would trigger as a relevant variable was not passed in the master playbooks. Fixes setting the variable to false being ignored. master/node playbooks were referencing the docker fact, which was not set at that point and thus we were always getting the default of true, regardless what was in your inventory. Stop passing registry insecure in via playbooks, we can access it when running openshift_facts itself. Add a new default in openshift facts. --- roles/openshift_docker_facts/tasks/main.yml | 2 +- roles/openshift_facts/library/openshift_facts.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'roles') diff --git a/roles/openshift_docker_facts/tasks/main.yml b/roles/openshift_docker_facts/tasks/main.yml index 3acd2bba8..0e51fd16f 100644 --- a/roles/openshift_docker_facts/tasks/main.yml +++ b/roles/openshift_docker_facts/tasks/main.yml @@ -35,7 +35,7 @@ docker_options: > --insecure-registry={{ openshift.docker.hosted_registry_network }} {{ openshift.docker.options | default ('') }} - when: openshift.docker.hosted_registry_insecure | default(False) | bool + when: openshift.docker.hosted_registry_insecure | default(False) | bool and openshift.docker.hosted_registry_network is defined - set_fact: docker_options: "{{ openshift.docker.options | default(omit) }}" diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index bfd09676f..213775a95 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -1710,7 +1710,7 @@ class OpenShiftFacts(object): set_node_ip=False) if 'docker' in roles: - docker = dict(disable_push_dockerhub=False) + docker = dict(disable_push_dockerhub=False, hosted_registry_insecure=True) version_info = get_docker_version_info() if version_info is not None: docker['api_version'] = version_info['api_version'] -- cgit v1.2.3