---
- name: Create a k8s Role
  community.okd.k8s:
    api_key: "{{ communishift_ocp_api_token }}"
    host: "{{ communishift_ocp_api_host }}"
    state: present
    definition:
      apiVersion: rbac.authorization.k8s.io/v1
      kind: Role
      metadata:
        name: "{{ item.value.name }}-efs-role"
        namespace: "{{ item.value.name }}"
      rules:
        - apiGroups:
            - aws-efs.managed.openshift.io
          resources:
            - '*'
          verbs:
            - '*'
