File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 148148 delay : 5
149149 until : __r_create_aap_osac_sa is success
150150
151- - name : " Create osac-sa ClusterRoleBinding in AAP namespace "
151+ - name : " Create osac ClusterRole "
152152 kubernetes.core.k8s :
153153 state : present
154- definition : " {{ lookup('ansible.builtin.template', '../templates/aap-osac-clusterrolebinding .yaml.j2') | from_yaml }}"
155- register : __r_create_aap_osac_clusterrolebinding
154+ definition : " {{ lookup('ansible.builtin.template', '../templates/aap-osac-clusterrole .yaml.j2') | from_yaml }}"
155+ register : __r_create_aap_osac_clusterrole
156156 retries : 10
157157 delay : 5
158- until : __r_create_aap_osac_clusterrolebinding is success
158+ until : __r_create_aap_osac_clusterrole is success
159+
160+ - name : " Create osac-rolebinding RoleBinding in AAP namespace"
161+ kubernetes.core.k8s :
162+ state : present
163+ definition : " {{ lookup('ansible.builtin.template', '../templates/aap-osac-rolebinding.yaml.j2') | from_yaml }}"
164+ register : __r_create_aap_osac_rolebinding
165+ retries : 10
166+ delay : 5
167+ until : __r_create_aap_osac_rolebinding is success
159168
160169 - name : " Create AnsibleAutomationPlatform resource"
161170 kubernetes.core.k8s :
Original file line number Diff line number Diff line change 1+ ---
2+ apiVersion: rbac.authorization.k8s.io/v1
3+ kind: ClusterRole
4+ metadata:
5+ name: osac
6+ rules:
7+ - apiGroups:
8+ - "osac.openshift.io"
9+ resources:
10+ - "tenants"
11+ verbs:
12+ - "get"
13+ - "list"
14+ - "watch"
15+
16+ - apiGroups:
17+ - "osac.openshift.io"
18+ resources:
19+ - "computeinstances"
20+ verbs:
21+ - "get"
22+ - "list"
23+ - "watch"
24+ - "create"
25+ - "update"
26+ - "patch"
27+ - "delete"
28+
29+ - apiGroups:
30+ - ""
31+ resources:
32+ - "secrets"
33+ verbs:
34+ - "get"
35+ - "list"
36+ - "watch"
37+ - "create"
38+ - "update"
39+ - "patch"
40+ - "delete"
Original file line number Diff line number Diff line change 11---
22apiVersion: rbac.authorization.k8s.io/v1
3- kind: ClusterRoleBinding
3+ kind: RoleBinding
44metadata:
5- name: osac-sa
5+ name: osac-rolebinding
6+ namespace: {{ aap_ns }}
67roleRef:
78 apiGroup: rbac.authorization.k8s.io
89 kind: ClusterRole
9- name: cluster-admin
10+ name: osac
1011subjects:
1112 - kind: ServiceAccount
1213 name: osac-sa
You can’t perform that action at this time.
0 commit comments