generate_clusterrolebindings.yaml 642 B

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