Przeglądaj źródła

Adding a query for the existing docker-registry route.

Kenny Woodson 8 lat temu
rodzic
commit
fddcb7414b
1 zmienionych plików z 8 dodań i 1 usunięć
  1. 8 1
      roles/cockpit-ui/tasks/main.yml

+ 8 - 1
roles/cockpit-ui/tasks/main.yml

@@ -5,6 +5,13 @@
   # role will create the appropriate route for the docker-registry.
   # When openshift_hosted_manage_registry=false then this code will
   # not be run.
+  - name: fetch the docker-registry route
+    oc_route:
+      kubeconfig: "{{ openshift_master_config_dir }}/admin.kubeconfig"
+      name: docker-registry
+      namespace: default
+      state: list
+    register: docker_registry_route
 
   - name: Create passthrough route for registry-console
     oc_route:
@@ -37,7 +44,7 @@
       {% if openshift_cockpit_deployer_prefix is defined  %}-p IMAGE_PREFIX="{{ openshift_cockpit_deployer_prefix }}"{% endif %}
       {% if openshift_cockpit_deployer_version is defined  %}-p IMAGE_VERSION="{{ openshift_cockpit_deployer_version }}"{% endif %}
       -p OPENSHIFT_OAUTH_PROVIDER_URL="{{ openshift.master.public_api_url }}"
-      -p REGISTRY_HOST="{{ docker_registry_route.results.results[0].spec.host }}"
+      -p REGISTRY_HOST="{{ docker_registry_route.results[0].spec.host }}"
       -p COCKPIT_KUBE_URL="https://{{ registry_console_cockpit_kube.results.results[0].spec.host }}"
       --config={{ openshift_hosted_kubeconfig }}
       -n default