Created
September 8, 2017 15:33
-
-
Save wabouhamad/e0c2cb8937ecbf15870b34f3d669a8f3 to your computer and use it in GitHub Desktop.
OCP 3.6 Ansible playbook to tune journald
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: journald optimizations to allow for increased logging rates | |
hosts: all | |
gather_facts: False | |
tasks: | |
- name: Stop and disable rsyslog | |
systemd: | |
name: "{{ item }}" | |
state: stopped | |
enabled: no | |
with_items: | |
- rsyslog | |
- name: Enable journald persistence | |
ini_file: | |
dest: "/etc/systemd/journald.conf" | |
section: Journal | |
option: Storage | |
value: "Persistent" | |
no_extra_spaces: yes | |
- name: remove journald rate limit burst limit | |
ini_file: | |
dest: "/etc/systemd/journald.conf" | |
section: Journal | |
option: RateLimitBurst | |
value: "0" | |
no_extra_spaces: yes | |
- name: remove journald rate limit interval | |
ini_file: | |
dest: "/etc/systemd/journald.conf" | |
section: Journal | |
option: RateLimitIntervalSec | |
value: "0" | |
no_extra_spaces: yes | |
- name: Create /var/log/journal | |
file: | |
path: /var/log/journal | |
state: directory | |
owner: root | |
group: root | |
mode: 0755 | |
- name: Restart journald | |
systemd: | |
name: "{{ item }}" | |
state: restarted | |
with_items: | |
- systemd-journald | |
- name: Clean up yum cache | |
command: yum clean all | |
- name: Remove all yum cache directories | |
command: rm -rf /var/cache/yum/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To add to that,
persistent
will create/var/log/journal
automatically.auto
would require manual creation of that directory for persistency. Found this inman journald.conf
underStorage=
.