generate_serviceaccounts.yaml 752 B

123456789101112131415161718192021222324252627
  1. ---
  2. - name: Generating serviceaccounts for hawkular metrics/cassandra
  3. template: src=serviceaccount.j2 dest={{mktemp.stdout}}/templates/metrics-{{obj_name}}-sa.yaml
  4. vars:
  5. obj_name: "{{item.name}}"
  6. labels:
  7. metrics-infra: support
  8. secrets:
  9. - hawkular-{{item.secret}}-secrets
  10. with_items:
  11. - name: hawkular
  12. secret: hawkular-metrics-secrets
  13. - name: cassandra
  14. secret: hawkular-cassandra-secrets
  15. changed_when: no
  16. - name: Set serviceaccounts for hawkular metrics/cassandra
  17. oc_obj:
  18. name: "{{ item }}"
  19. kind: serviceaccount
  20. namespace: "{{ openshift_metrics_project }}"
  21. files:
  22. - "{{ mktemp.stdout }}/templates/metrics-{{ item }}-sa.yaml"
  23. delete_after: true
  24. with_items:
  25. - hawkular
  26. - cassandra