---

- replace:
    dest=/etc/rsyslog.conf
    regexp='\*\.info;mail\.none;authpriv\.none;cron\.none'
    replace='*.info;mail.none;authpriv.none;cron.none;local6.none'
    backup=yes

- lineinfile:
    dest=/etc/rsyslog.conf
    line="local6.*                                                /var/log/drupal.log"
    backup=yes
  notify:
    - restart rsyslog

---

- replace:
    dest=/etc/rsyslog.conf
    regexp='\*\.info;mail\.none;authpriv\.none;cron\.none'
    replace='*.info;mail.none;authpriv.none;cron.none;local6.none'
    backup=yes

- lineinfile:
    dest=/etc/rsyslog.conf
    line="local6.*                                                /var/log/drupal.log"
    backup=yes
  notify:
    - restart rsyslog

# Make papertrail follow drupal.log logs.
- lineinfile:
    dest=/etc/log_files.yml
    insertafter='files:'
    line='  - {{ drupal_log_path }}'
    mode=644
  when:
    papertrail_enabled == True
  notify:
    - restart remote_syslog

Include drupal.log in papertrail monitoring.
Include drupal.log in papertrail monitoring.
