aboutsummaryrefslogtreecommitdiffstats
path: root/roles/rsyslog_client/tasks/main.yml
blob: c610d6d3f6ad02694325c87ed6628537cbf1321f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
- name: install rsyslog
  dnf:
    name: '{{ rsyslog_packages }}'
    state: present

- name: request TLS certificate
  include_role:
    name: getcert_request
  vars:
    certificate_sans: ['{{ ansible_fqdn }}']
    certificate_service: syslog
    certificate_path: '{{ rsyslog_certificate_path }}'
    certificate_key_path: '{{ rsyslog_certificate_key_path }}'
    certificate_hook: systemctl restart rsyslog
  when: rsyslog_tls

- name: generate rsyslog configuration
  template:
    src: etc/rsyslog.conf.j2
    dest: /etc/rsyslog.conf
  notify: restart rsyslog

- name: enable rsyslog
  systemd:
    name: rsyslog
    enabled: yes
    state: started