rsyslog.yaml 545 Bytes
- hosts: '{{module}}'
  tasks:
  - name: clear /etc/rsyslog.d
    command: rm -rf /etc/rsyslog.d
  - name: mkdir /etc/rsyslog.d
    command: mkdir -p /etc/rsyslog.d
  - name: cp rsyslog.conf to dest host
    copy:
     src: '{{src_path}}/log-centralization/client/etc/rsyslog.conf'
     dest: /etc/
     backup: yes
  - name: cp rsyslog.d/module.conf to dest host
    copy:
     src: '{{src_path}}/log-centralization/client/etc/rsyslog.d/{{module}}.conf'
     dest: /etc/rsyslog.d/
  - name: restart rsyslog
    command: service rsyslog restart