main.yaml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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: Set default image variables based on deployment_type
  6. include_vars: "{{ item }}"
  7. with_first_found:
  8. - "{{ openshift_deployment_type | default(deployment_type) }}.yml"
  9. - "default_images.yml"
  10. - name: Set logging image facts
  11. set_fact:
  12. openshift_logging_image_prefix: "{{ openshift_logging_image_prefix | default(__openshift_logging_image_prefix) }}"
  13. openshift_logging_image_version: "{{ openshift_logging_image_version | default(__openshift_logging_image_version) }}"
  14. - name: Create temp directory for doing work in
  15. command: mktemp -d /tmp/openshift-logging-ansible-XXXXXX
  16. register: mktemp
  17. changed_when: False
  18. check_mode: no
  19. tags: logging_init
  20. - debug: msg="Created temp dir {{mktemp.stdout}}"
  21. - name: Create local temp directory for doing work in
  22. local_action: command mktemp -d /tmp/openshift-logging-ansible-XXXXXX
  23. register: local_tmp
  24. changed_when: False
  25. check_mode: no
  26. become: no
  27. - include: install_logging.yaml
  28. when:
  29. - openshift_logging_install_logging | default(false) | bool
  30. - include: delete_logging.yaml
  31. when:
  32. - not openshift_logging_install_logging | default(false) | bool
  33. - name: Cleaning up local temp dir
  34. local_action: file path="{{local_tmp.stdout}}" state=absent
  35. tags: logging_cleanup
  36. changed_when: False