mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-03 20:31:44 +08:00
41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
---
|
|
- name: Create a k8s RoleBinding for group namespace permissions
|
|
community.okd.k8s:
|
|
api_key: "{{ communishift_ocp_api_token }}"
|
|
host: "{{ communishift_ocp_api_host }}"
|
|
state: present
|
|
definition:
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: "{{ item.value.name }}-group-rolebinding"
|
|
namespace: "{{ item.value.name }}"
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: admin
|
|
subjects:
|
|
- apiGroup: rbac.authorization.k8s.io
|
|
kind: Group
|
|
name: "{{ item.value.name }}-admins"
|
|
|
|
- name: Create a k8s RoleBinding for storage permissions
|
|
community.okd.k8s:
|
|
api_key: "{{ communishift_ocp_api_token }}"
|
|
host: "{{ communishift_ocp_api_host }}"
|
|
state: present
|
|
definition:
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: "{{ item.value.name }}-efs-rolebinding"
|
|
namespace: "{{ item.value.name }}"
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: Role
|
|
name: "{{ item.value.name }}-efs-role"
|
|
subjects:
|
|
- apiGroup: rbac.authorization.k8s.io
|
|
kind: Group
|
|
name: "{{ item.value.name }}-admins"
|