main.yaml 1.3 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: 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: Ensuring ruamel.yaml package is on target
  13. command: yum install -y ruamel.yaml
  14. check_mode: no
  15. - name: Copy the admin client config(s)
  16. command: >
  17. cp {{ openshift_master_config_dir }}/admin.kubeconfig {{ mktemp.stdout }}/admin.kubeconfig
  18. changed_when: False
  19. check_mode: no
  20. tags: logging_init
  21. - include: "{{ role_path }}/tasks/install_logging.yaml"
  22. when: openshift_logging_install_logging | default(false) | bool
  23. - include: "{{ role_path }}/tasks/upgrade_logging.yaml"
  24. when: openshift_logging_upgrade_logging | default(false) | bool
  25. - include: "{{ role_path }}/tasks/delete_logging.yaml"
  26. when:
  27. - not openshift_logging_install_logging | default(false) | bool
  28. - not openshift_logging_upgrade_logging | default(false) | bool
  29. - name: Delete temp directory
  30. file:
  31. name: "{{ mktemp.stdout }}"
  32. state: absent
  33. tags: logging_cleanup
  34. changed_when: False
  35. check_mode: no