summaryrefslogtreecommitdiffstats
path: root/roles/openshift_logging/tasks/upgrade_logging.yaml
blob: b2c8022d5106798e88ce45e12117f9793fd1db7f (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
---
- name: Stop the Cluster
  include: stop_cluster.yaml

- name: Upgrade logging
  include: install_logging.yaml
  vars:
    start_cluster: False

# ensure that ES is running
- shell: >
    {{openshift.common.client_binary}} --config={{mktemp.stdout}}/admin.kubeconfig get dc -l component=es -o name -n {{openshift_logging_namespace}}
  register: es_dc
  check_mode: no

- name: start elasticsearch
  include: scale.yaml
  vars:
    desired: 1
  with_items: "{{es_dc.stdout_lines}}"
  loop_control:
    loop_var: object

- copy:
    src: es_migration.sh
    dest: {{mktemp.stdout}}/es_migration.sh

- name: Run upgrade scripts
  shell: >
    sh {{mktemp.stdout}}/es_migration.sh {{openshift.common.config_base}}/logging/ca.crt {{openshift.common.config_base}}/logging/system.admin.key {{openshift.common.config_base}}/logging/system.admin.crt {{openshift_logging_es_host}} {{openshift_logging_es_port}} {{openshift_logging_namespace}}

- name: Start up rest of cluster
  include: start_cluster.yaml