igor_nikiforov.journald
Ansible角色:Journald
此角色配置您Linux发行版上的Journald参数。
要求
此角色在以下Ansible版本上进行开发和测试:
名称 | 版本 |
---|---|
ansible | >= 2.9.7 |
其他Ansible版本未经过测试,但可能可以正常工作。
安装
使用ansible-galaxy install igor_nikiforov.journald
来安装该角色的最新稳定版本。
您也可以从requirements文件中安装,使用ansible-galaxy install -r requirements.yml
:
# requirements.yml
---
roles:
- name: igor_nikiforov.journald
version: v1.0.0
用法
该角色支持所有Journald配置参数。有关所有可能的参数,请参考 https://www.freedesktop.org/software/systemd/man/journald.conf.html。
示例
# playbook.yml
---
- hosts: all
become: true
gather_facts: false
pre_tasks:
- wait_for_connection: { timeout: 300 }
- setup:
vars:
journald_config:
Compress: yes
ForwardToConsole: no
ForwardToSyslog: no
MaxRetentionSec: 1month
RateLimitBurst: 10000
RateLimitIntervalSec: 30s
Storage: persistent
SyncIntervalSec: 1s
SystemMaxUse: 8g
SystemKeepFree: 20%
SystemMaxFileSize: 10M
tasks:
- name: 配置journald参数
import_role:
name: journald
许可证
MIT