main.yaml 1.5 KB

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