Parcourir la source

* Refactor to use openshift_master_config_dir when deploying services

Jhon Honce il y a 9 ans
Parent
commit
8d06801770

+ 4 - 1
roles/openshift_registry/tasks/main.yml

@@ -3,6 +3,9 @@
   when: oreg_url is defined
 
 - name: Deploy OpenShift Registry
-  command: openshift admin registry --create --credentials=/var/lib/openshift/openshift.local.certificates/openshift-registry/.kubeconfig {{ _oreg_images|default() }}
+  command: >
+    {{ openshift.common.admin_binary }} registry
+    --create
+    --credentials={{ openshift_master_config_dir }}/openshift-registry.kubeconfig {{ _oreg_images|default() }}
   register: _oreg_results
   changed_when: "'service exists' not in _oreg_results.stdout"

+ 1 - 0
roles/openshift_registry/vars/main.yml

@@ -1,2 +1,3 @@
 ---
+openshift_master_config_dir: /etc/openshift/master
 

+ 4 - 1
roles/openshift_router/tasks/main.yml

@@ -3,6 +3,9 @@
   when: oreg_url is defined
 
 - name: Deploy OpenShift Router
-  command: openshift ex router --create --credentials=/var/lib/openshift/openshift.local.certificates/openshift-router/.kubeconfig {{ _ortr_images|default() }}
+  command: >
+    {{ openshift.common.admin_binary }} router
+    --create
+    --credentials={{ openshift_master_config_dir }}/openshift-router.kubeconfig {{ _ortr_images|default() }}
   register: _ortr_results
   changed_when: "'service exists' not in _ortr_results.stdout"

+ 1 - 0
roles/openshift_router/vars/main.yml

@@ -1,2 +1,3 @@
 ---
+openshift_master_config_dir: /etc/openshift/master