main.yaml 986 B

123456789101112131415161718192021222324
  1. ---
  2. - name: check that hawkular_metrics_hostname is set
  3. fail: msg='the openshift_metrics_hawkular_metrics_hostname variable is required'
  4. when: "{{ openshift_metrics_hawkular_metrics_hostname is not defined }}"
  5. - name: check the value of openshift_metrics_hawkular_cassandra_storage_type
  6. fail:
  7. msg: >
  8. openshift_metrics_hawkular_cassandra_storage_type ({{ openshift_metrics_hawkular_cassandra_storage_type }})
  9. is invalid, must be one of: emptydir, pv, dynamic
  10. when: openshift_metrics_hawkular_cassandra_storage_type not in openshift_metrics_hawkular_cassandra_storage_types
  11. - name: Install Metrics
  12. include: "{{ role_path }}/tasks/install_{{ include_file }}.yaml"
  13. with_items:
  14. - metrics
  15. - heapster
  16. - hawkular
  17. loop_control:
  18. loop_var: include_file
  19. - name: create objects
  20. command: >
  21. {{ openshift.common.client_binary }} -n '{{ openshift_metrics_project }}'
  22. apply -f {{ item }}
  23. with_fileglob:
  24. - "{{ mktemp.stdout }}/templates/*.yaml"