main.yaml 940 B

1234567891011121314151617181920212223242526272829303132
  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. - include_tasks: install_logging.yaml
  18. when:
  19. - openshift_logging_install_logging | default(false) | bool
  20. - include_tasks: delete_logging.yaml
  21. when:
  22. - not openshift_logging_install_logging | default(false) | bool
  23. - name: Cleaning up local temp dir
  24. local_action: file path="{{local_tmp.stdout}}" state=absent
  25. tags: logging_cleanup
  26. changed_when: False