Skip to content

Commit

Permalink
fix: centos7 rsyslog服务启动错误 easzlab#538
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmzj committed Apr 30, 2019
1 parent c2c0699 commit a193907
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion roles/prepare/tasks/centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,19 @@
line: "SELINUX=disabled"

# 优化设置 journal 日志相关,避免日志重复搜集,浪费系统资源
- name: 禁止rsyslog获取journald日志
- name: 禁止rsyslog获取journald日志1
lineinfile:
dest: /etc/rsyslog.conf
state: present
regexp: 'ModLoad imjournal'
line: '#$ModLoad imjournal # provides access to the systemd journal'

- name: 禁止rsyslog获取journald日志2
lineinfile:
dest: /etc/rsyslog.conf
state: present
regexp: 'IMJournalStateFile'
line: '#$IMJournalStateFile imjournal.state'

- name: 重启rsyslog服务
service: name=rsyslog state=restarted

0 comments on commit a193907

Please sign in to comment.