main.yaml 474 B

1234567891011121314151617181920
  1. ---
  2. - name: Create temp directory for doing work in
  3. command: mktemp -d /tmp/openshift-grafana-ansible-XXXXXX
  4. register: mktemp
  5. changed_when: False
  6. check_mode: no
  7. - include_tasks: facts.yaml
  8. - include_tasks: install_grafana.yaml
  9. when: grafana_state == 'present'
  10. - include_tasks: uninstall_grafana.yaml
  11. when: grafana_state == 'absent'
  12. - name: Delete temp directory
  13. file:
  14. name: "{{ mktemp.stdout }}"
  15. state: absent
  16. changed_when: False
  17. check_mode: no