summaryrefslogtreecommitdiffstats
path: root/roles/openshift_master/tasks/journald.yml
blob: f79955e957a2b3fb7b3802be4155e8600627dda4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
- name: Checking for journald.conf
  stat: path=/etc/systemd/journald.conf
  register: journald_conf_file

- name: Update journald setup
  replace:
    dest: /etc/systemd/journald.conf
    regexp: '^(\#| )?{{ item.var }}=\s*.*?$'
    replace: ' {{ item.var }}={{ item.val }}'
    backup: yes
  with_items: "{{ journald_vars_to_replace | default([]) }}"
  when: journald_conf_file.stat.exists
  register: journald_update

# I need to restart journald immediatelly, otherwise it gets into way during
# further steps in ansible
- name: Restart journald
  systemd:
    name: systemd-journald
    state: restarted
  when: journald_update | changed