main.yaml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ---
  2. - name: Add Management Infrastructure project
  3. oc_project:
  4. name: management-infra
  5. description: Management Infrastructure
  6. - name: Create Admin and Image Inspector Service Account
  7. oc_serviceaccount:
  8. name: "{{ item }}"
  9. namespace: management-infra
  10. state: present
  11. with_items:
  12. - management-admin
  13. - inspector-admin
  14. - name: Create manageiq cluster role
  15. oc_clusterrole:
  16. name: management-infra-admin
  17. rules:
  18. - apiGroups:
  19. - ""
  20. resources:
  21. - pods/log
  22. verbs:
  23. - "get"
  24. - apiGroups:
  25. - ""
  26. resources:
  27. - pods/proxy
  28. verbs:
  29. - "*"
  30. - name: Create Hawkular Metrics Admin Cluster Role
  31. oc_clusterrole:
  32. name: hawkular-metrics-admin
  33. rules:
  34. - apiGroups:
  35. - ""
  36. resources:
  37. - hawkular-alerts
  38. - hawkular-metrics
  39. verbs:
  40. - "*"
  41. - name: Configure role/user permissions
  42. oc_adm_policy_user:
  43. namespace: management-infra
  44. resource_name: "{{ item.resource_name }}"
  45. resource_kind: "{{ item.resource_kind }}"
  46. user: "{{ item.user }}"
  47. with_items: "{{ manage_iq_tasks }}"
  48. - name: Configure 3_2 role/user permissions
  49. oc_adm_policy_user:
  50. namespace: management-infra
  51. resource_name: "{{ item.resource_name }}"
  52. resource_kind: "{{ item.resource_kind }}"
  53. user: "{{ item.user }}"
  54. with_items: "{{manage_iq_openshift_3_2_tasks}}"