Turns out that namespace-local roles are broken pre openshift 3.6
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
9b909c18ee
commit
e0f9332d86
3 changed files with 8 additions and 1 deletions
|
@ -21,6 +21,12 @@
|
||||||
- name: Call `oc apply` on the copied file
|
- name: Call `oc apply` on the copied file
|
||||||
shell: oc -n {{app}} apply -f {{tmpfile.path}}
|
shell: oc -n {{app}} apply -f {{tmpfile.path}}
|
||||||
run_once: true
|
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
|
- name: Delete temporary file
|
||||||
file: path={{tmpfile.path}} state=absent
|
file: path={{tmpfile.path}} state=absent
|
||||||
|
|
|
@ -35,6 +35,8 @@
|
||||||
name: openshift/object
|
name: openshift/object
|
||||||
vars:
|
vars:
|
||||||
template_fullpath: "{{roles_path}}/openshift/project/templates/role-appowners.yml"
|
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
|
- name: appowners.yml
|
||||||
include_role:
|
include_role:
|
||||||
|
|
|
@ -6,7 +6,6 @@ metadata:
|
||||||
roleRef:
|
roleRef:
|
||||||
kind: Role
|
kind: Role
|
||||||
name: appowner
|
name: appowner
|
||||||
namespace: "{{app}}"
|
|
||||||
subjects:
|
subjects:
|
||||||
{% for owner in appowners %}
|
{% for owner in appowners %}
|
||||||
- kind: User
|
- kind: User
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue