summaryrefslogtreecommitdiffstats
path: root/roles/openshift_logging/tasks/main.yaml
blob: 57426bc7762f2edd1e97e82abfbc5fa146955408 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
- fail:
    msg: Only one Fluentd nodeselector key pair should be provided
  when: openshift_logging_fluentd_nodeselector.keys() | count > 1

- assert:
    that: openshift_deployment_type in ['origin']
    msg: "Only 'origin' deployments are allowed with openshift_logging_es5_techpreview set to true"
  when: openshift_logging_es5_techpreview | bool

- name: Create temp directory for doing work in
  command: mktemp -d /tmp/openshift-logging-ansible-XXXXXX
  register: mktemp
  changed_when: False
  check_mode: no
  tags: logging_init

- debug: msg="Created temp dir {{mktemp.stdout}}"

- name: Create local temp directory for doing work in
  local_action: command mktemp -d /tmp/openshift-logging-ansible-XXXXXX
  register: local_tmp
  changed_when: False
  check_mode: no

- name: Chmod local temp directory for doing work in
  local_action: command chmod 777 "{{ local_tmp.stdout }}"
  changed_when: False
  check_mode: no

- include_tasks: install_logging.yaml
  when:
    - openshift_logging_install_logging | default(false) | bool

- include_tasks: delete_logging.yaml
  when:
    - not openshift_logging_install_logging | default(false) | bool

- name: Cleaning up local temp dir
  local_action: file path="{{local_tmp.stdout}}" state=absent
  tags: logging_cleanup
  changed_when: False