ansible/roles/rsyslog_collector/tasks/main.yml
2021-03-01 01:27:56 +01:00

24 lines
542 B
YAML

---
- name: Install rsyslog-relp if needed
become: true
apt:
name: rsyslog-relp
state: latest
when: "rsyslog_inputs | selectattr('proto', 'eq', 'relp') | list"
- name: Ensure log storage directory exists
become: true
file:
path: "{{ rsyslog_collector_base_dir }}"
state: directory
- name: Deploy rsyslog input configuration file
become: true
template:
src: 10-collector.conf.j2
dest: /etc/rsyslog.d/10-collector.conf
owner: root
group: root
mode: u=rw,g=r,o=r
notify: Restart rsyslog
...