blob: c7f4a2f9374f77355fd289e8bcd9c035270700af (
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
---
- fail:
msg: Only one Fluentd nodeselector key pair should be provided
when: "{{ openshift_logging_fluentd_nodeselector.keys() | count }} > 1"
- name: Set default image variables based on deployment_type
include_vars: "{{ item }}"
with_first_found:
- "{{ openshift_deployment_type | default(deployment_type) }}.yml"
- "default_images.yml"
- name: Set logging image facts
set_fact:
openshift_logging_image_prefix: "{{ openshift_logging_image_prefix | default(__openshift_logging_image_prefix) }}"
openshift_logging_image_version: "{{ openshift_logging_image_version | default(__openshift_logging_image_version) }}"
- 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
- debug: msg="Created local temp dir {{local_tmp.stdout}}"
- name: Copy the admin client config(s)
command: >
cp {{ openshift_master_config_dir }}/admin.kubeconfig {{ mktemp.stdout }}/admin.kubeconfig
changed_when: False
check_mode: no
tags: logging_init
- include: "{{ role_path }}/tasks/install_logging.yaml"
when: openshift_logging_install_logging | default(false) | bool
- include: "{{ role_path }}/tasks/upgrade_logging.yaml"
when: openshift_logging_upgrade_logging | default(false) | bool
- include: "{{ role_path }}/tasks/delete_logging.yaml"
when:
- not openshift_logging_install_logging | default(false) | bool
- not openshift_logging_upgrade_logging | default(false) | bool
- name: Delete temp directory
file:
name: "{{ mktemp.stdout }}"
state: absent
tags: logging_cleanup
changed_when: False
check_mode: no
- name: Cleaning up local temp dir
local_action: file path="{{local_tmp.stdout}}" state=absent
tags: logging_cleanup
changed_when: False
|