main.yaml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ---
  2. - fail:
  3. msg: Only one Fluentd nodeselector key pair should be provided
  4. when: openshift_logging_fluentd_nodeselector.keys() | count > 1
  5. - assert:
  6. that: openshift_deployment_type in ['origin']
  7. msg: "Only 'origin' deployments are allowed with openshift_logging_es5_techpreview set to true"
  8. when: openshift_logging_es5_techpreview | bool
  9. - name: Create temp directory for doing work in
  10. command: mktemp -d /tmp/openshift-logging-ansible-XXXXXX
  11. register: mktemp
  12. changed_when: False
  13. check_mode: no
  14. tags: logging_init
  15. - debug: msg="Created temp dir {{mktemp.stdout}}"
  16. - name: Create local temp directory for doing work in
  17. local_action: command mktemp -d /tmp/openshift-logging-ansible-XXXXXX
  18. register: local_tmp
  19. changed_when: False
  20. check_mode: no
  21. - name: Chmod local temp directory for doing work in
  22. local_action: command chmod 777 "{{ local_tmp.stdout }}"
  23. changed_when: False
  24. check_mode: no
  25. - include_tasks: install_logging.yaml
  26. when:
  27. - openshift_logging_install_logging | default(false) | bool
  28. - include_tasks: delete_logging.yaml
  29. when:
  30. - not openshift_logging_install_logging | default(false) | bool
  31. - name: Cleaning up local temp dir
  32. local_action: file path="{{local_tmp.stdout}}" state=absent
  33. tags: logging_cleanup
  34. changed_when: False