From 59c9668c314518762cceb5845998bc9466fa5722 Mon Sep 17 00:00:00 2001
From: Giuseppe Scrivano <gscrivan@redhat.com>
Date: Mon, 31 Jul 2017 08:29:40 +0200
Subject: cri-o: allow to override CRI-O image indipendently from Docker

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
---
 inventory/byo/hosts.origin.example          | 1 +
 inventory/byo/hosts.ose.example             | 1 +
 roles/docker/tasks/systemcontainer_crio.yml | 6 +++---
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/inventory/byo/hosts.origin.example b/inventory/byo/hosts.origin.example
index c9f79d964..9237427b5 100644
--- a/inventory/byo/hosts.origin.example
+++ b/inventory/byo/hosts.origin.example
@@ -116,6 +116,7 @@ openshift_release=v3.6
 # will be built off of the deployment type and ansible_distribution. Only
 # use this option if you are sure you know what you are doing!
 #openshift_docker_systemcontainer_image_registry_override="registry.example.com"
+#openshift_crio_systemcontainer_image_registry_override="registry.example.com"
 # Items added, as is, to end of /etc/sysconfig/docker OPTIONS
 # Default value: "--log-driver=journald"
 #openshift_docker_options="-l warn --ipv6=false"
diff --git a/inventory/byo/hosts.ose.example b/inventory/byo/hosts.ose.example
index a4a9cca81..9c710bb0a 100644
--- a/inventory/byo/hosts.ose.example
+++ b/inventory/byo/hosts.ose.example
@@ -116,6 +116,7 @@ openshift_release=v3.6
 # will be built off of the deployment type and ansible_distribution. Only
 # use this option if you are sure you know what you are doing!
 #openshift_docker_systemcontainer_image_registry_override="registry.example.com"
+#openshift_crio_systemcontainer_image_registry_override="registry.example.com"
 # Items added, as is, to end of /etc/sysconfig/docker OPTIONS
 # Default value: "--log-driver=journald"
 #openshift_docker_options="-l warn --ipv6=false"
diff --git a/roles/docker/tasks/systemcontainer_crio.yml b/roles/docker/tasks/systemcontainer_crio.yml
index cfc9157cc..f18a5b117 100644
--- a/roles/docker/tasks/systemcontainer_crio.yml
+++ b/roles/docker/tasks/systemcontainer_crio.yml
@@ -96,10 +96,10 @@
     # For https://github.com/openshift/openshift-ansible/pull/4049#discussion_r114478504
     - name: Use a testing registry if requested
       set_fact:
-        l_crio_image_prepend: "{{ openshift_docker_systemcontainer_image_registry_override }}"
+        l_crio_image_prepend: "{{ openshift_crio_systemcontainer_image_registry_override }}"
       when:
-        - openshift_docker_systemcontainer_image_registry_override is defined
-        - openshift_docker_systemcontainer_image_registry_override != ""
+        - openshift_crio_systemcontainer_image_registry_override is defined
+        - openshift_crio_systemcontainer_image_registry_override != ""
 
     - name: Set the full image name
       set_fact:
-- 
cgit v1.2.3