install_hawkular_schema_job.yaml 784 B

123456789101112131415161718192021
  1. ---
  2. - name: list installed jobs
  3. command: >
  4. {{ openshift_client_binary }} -n {{ openshift_metrics_project }} --config={{ mktemp.stdout }}/admin.kubeconfig
  5. get jobs
  6. register: jobs
  7. # We cannot use oc apply here because the Job template has immutable fields
  8. # on which oc apply will fail.
  9. - name: remove hawkular-metrics-schema job
  10. command: >
  11. {{ openshift_client_binary }} -n {{ openshift_metrics_project }} --config={{ mktemp.stdout }}/admin.kubeconfig
  12. delete job hawkular-metrics-schema
  13. register: delete_schema_job
  14. when: "'hawkular-metrics-schema' in jobs.stdout"
  15. - name: generate hawkular-metrics schema job
  16. template:
  17. src: hawkular_metrics_schema_job.j2
  18. dest: "{{ mktemp.stdout }}/templates/hawkular_metrics_schema_job.yaml"
  19. changed_when: false