diff --git a/roles/openshift/object/tasks/main.yml b/roles/openshift/object/tasks/main.yml index e7c19847b6..a7a70ccc8d 100644 --- a/roles/openshift/object/tasks/main.yml +++ b/roles/openshift/object/tasks/main.yml @@ -21,6 +21,12 @@ - name: Call `oc apply` on the copied file shell: oc -n {{app}} apply -f {{tmpfile.path}} run_once: true + when: global is not defined or not global + +- name: GLOBAL call `oc apply` on the copied file + shell: oc apply -f {{tmpfile.path}} + run_once: true + when: global is defined and global - name: Delete temporary file file: path={{tmpfile.path}} state=absent diff --git a/roles/openshift/project/tasks/main.yml b/roles/openshift/project/tasks/main.yml index f9fddca6c0..73d5259326 100644 --- a/roles/openshift/project/tasks/main.yml +++ b/roles/openshift/project/tasks/main.yml @@ -35,6 +35,8 @@ name: openshift/object vars: template_fullpath: "{{roles_path}}/openshift/project/templates/role-appowners.yml" + # Namespace-local roles are unusable until Openshift 3.6. Remove this global: true when upgraded. + global: true - name: appowners.yml include_role: diff --git a/roles/openshift/project/templates/appowners.yml b/roles/openshift/project/templates/appowners.yml index 38aaa93e28..7c49fe20c4 100644 --- a/roles/openshift/project/templates/appowners.yml +++ b/roles/openshift/project/templates/appowners.yml @@ -6,7 +6,6 @@ metadata: roleRef: kind: Role name: appowner - namespace: "{{app}}" subjects: {% for owner in appowners %} - kind: User