diff --git a/deployment/deprecated/logging/fluentd-container-puppet.yaml b/deployment/deprecated/logging/fluentd-container-puppet.yaml index cbdfb3d974..072a928e85 100644 --- a/deployment/deprecated/logging/fluentd-container-puppet.yaml +++ b/deployment/deprecated/logging/fluentd-container-puppet.yaml @@ -127,10 +127,35 @@ outputs: - /var/lib/config-data/puppet-generated/fluentd/:/var/lib/kolla/config_files/src:ro - /var/log/containers:/var/log/containers:ro - /var/log/containers/fluentd:/var/log/fluentd:rw,z - - /etc/rsyslog.d:/etc/rsyslog.d:rw environment: - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS host_prep_tasks: + - name: Check if rsyslog exists + shell: systemctl is-active rsyslog + register: rsyslog_config + - when: + - rsyslog_config is changed + - rsyslog_config.rc == 0 + block: + - name: Create rsyslog.d/fluentd + blockinfile: + content: | + *.* @127.0.0.1:42185 + create: yes + owner: root + group: root + mode: 0644 + path: /etc/rsyslog.d/fluentd.conf + seuser: system_u + serole: object_r + setype: syslog_conf_t + selevel: s0 + register: logconfig + - name: restart rsyslog service after logging conf change + service: + name: rsyslog + state: restarted + when: logconfig is changed - name: create persistent directories file: path: "{{ item.path }}"