summaryrefslogtreecommitdiffstats
path: root/roles/openshift_provisioners/tasks/generate_clusterrolebindings.yaml
blob: 1e6aafd00234705e480a99dcfd965baabb47bf28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---
- name: Generate ClusterRoleBindings
  template:
    src: clusterrolebinding.j2
    dest: "{{ mktemp.stdout }}/templates/{{ obj_name }}-clusterrolebinding.yaml"
  vars:
    acct_name: provisioners-{{item}}
    obj_name: run-provisioners-{{item}}
    labels:
      provisioners-infra: support
    crb_usernames: ["system:serviceaccount:{{openshift_provisioners_project}}:{{acct_name}}"]
    subjects:
      - kind: ServiceAccount
        name: "{{acct_name}}"
        namespace: "{{openshift_provisioners_project}}"
    cr_name: "system:persistent-volume-provisioner"
  with_items:
    # TODO
    - efs
  check_mode: no
  changed_when: no