summaryrefslogtreecommitdiffstats
path: root/playbooks/openshift-logging/private/config.yml
blob: f2a57f9f8fb60ae8167ff7d70be4b26ad1c57a1e (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
64
65
66
67
68
69
70
---
- name: Logging Install Checkpoint Start
  hosts: all
  gather_facts: false
  tasks:
  - name: Set Logging install 'In Progress'
    run_once: true
    set_stats:
      data:
        installer_phase_logging:
          status: "In Progress"
          start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"

- name: Update vm.max_map_count for ES 5.x
  hosts: all
  gather_facts: false
  tasks:
  - when:
    - openshift_logging_es5_techpreview | default(false) | bool
    - openshift_deployment_type in ['origin']
    block:
    - name: Checking vm max_map_count value
      command:
        cat /proc/sys/vm/max_map_count
      register: _vm_max_map_count

    - stat:
        path: /etc/sysctl.d/99-elasticsearch.conf
      register: _99_es_conf

    - name: Check for current value of vm.max_map_count in 99-elasticsearch.conf
      command: >
        sed /etc/sysctl.d/99-elasticsearch.conf -e 's/vm.max_map_count=\(.*\)/\1/'
      register: _curr_vm_max_map_count
      when: _99_es_conf.stat.exists

    - name: Updating vm.max_map_count value
      sysctl:
        name: vm.max_map_count
        value: 262144
        sysctl_file: "/etc/sysctl.d/99-elasticsearch.conf"
        reload: yes
      when:
      - _vm_max_map_count.stdout | default(0) | int < 262144 | int or _curr_vm_max_map_count.stdout | default(0) | int < 262144

- name: OpenShift Aggregated Logging
  hosts: oo_first_master
  roles:
  - openshift_logging

# TODO: Remove when master config property is removed
- name: Update Master configs
  hosts: oo_masters:!oo_first_master
  tasks:
  - include_role:
      name: openshift_logging
      tasks_from: update_master_config
    when: not openshift.common.version_gte_3_9

- name: Logging Install Checkpoint End
  hosts: all
  gather_facts: false
  tasks:
  - name: Set Logging install 'Complete'
    run_once: true
    set_stats:
      data:
        installer_phase_logging:
          status: "Complete"
          end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"