main.yaml 953 B

123456789101112131415161718192021222324252627282930313233
  1. ---
  2. - fail:
  3. msg: Only one Fluentd nodeselector key pair should be provided
  4. when: openshift_logging_fluentd_nodeselector.keys() | count > 1
  5. - name: Create temp directory for doing work in
  6. command: mktemp -d /tmp/openshift-logging-ansible-XXXXXX
  7. register: mktemp
  8. changed_when: False
  9. check_mode: no
  10. tags: logging_init
  11. - debug: msg="Created temp dir {{mktemp.stdout}}"
  12. - name: Create local temp directory for doing work in
  13. local_action: command mktemp -d /tmp/openshift-logging-ansible-XXXXXX
  14. register: local_tmp
  15. changed_when: False
  16. check_mode: no
  17. become: no
  18. - include_tasks: install_logging.yaml
  19. when:
  20. - openshift_logging_install_logging | default(false) | bool
  21. - include_tasks: delete_logging.yaml
  22. when:
  23. - not openshift_logging_install_logging | default(false) | bool
  24. - name: Cleaning up local temp dir
  25. local_action: file path="{{local_tmp.stdout}}" state=absent
  26. tags: logging_cleanup
  27. changed_when: False