main.yaml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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: "{{ role_path }}/tasks/install_logging.yaml"
  28. when: openshift_logging_install_logging | default(false) | bool
  29. - include: "{{ role_path }}/tasks/delete_logging.yaml"
  30. when:
  31. - not openshift_logging_install_logging | default(false) | bool
  32. - name: Cleaning up local temp dir
  33. local_action: file path="{{local_tmp.stdout}}" state=absent
  34. tags: logging_cleanup
  35. changed_when: False