Created
September 15, 2017 15:42
-
-
Save mffiedler/43c64414cb291ecede5a8dbe4825486f to your computer and use it in GitHub Desktop.
Journald setup
This file contains 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: Setup 200 node cluster of small nodes for logging testing | |
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: Increase journald rate limit burst to 10000 | |
ini_file: | |
dest: "/etc/systemd/journald.conf" | |
section: Journal | |
option: RateLimitBurst | |
value: "10000" | |
no_extra_spaces: yes | |
- name: Decrease journald rate limit interval to 1 sec | |
ini_file: | |
dest: "/etc/systemd/journald.conf" | |
section: Journal | |
option: RateLimitIntervalSec | |
value: "1s" | |
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