-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlogger.yaml
55 lines (46 loc) · 1.02 KB
/
logger.yaml
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
- hosts: biff
roles:
- role: lxc_guest
vm_name: logger
- role: ssh_server
ansible_connection: lxc_ssh
ansible_docker_extra_args: logger
- hosts: all
tasks:
- name: Install rsyslog on client
apt:
name: rsyslog
update_cache: yes
- hosts: logger
tasks:
- name: Configure rsyslog server
blockinfile:
block: >
$ModLoad imudp
$UDPServerRun 514
$$ModLoad imtcp
$InputTCPServerRun 514
dest: /etc/rsyslog.conf
state: present
- name: Enable rsyslog on server
service:
name: rsyslog
enabled: yes
state: started
- hosts: all
vars:
- log_destination:
tasks:
- name: Configure rsyslog client
template:
dest: /etc/rsyslog.d/50-default.conf
src: templates/rsyslog_client.conf
- name: Enable rsyslog on client
service:
name: rsyslog
enabled: yes
state: started
- hosts: status
roles:
- role: icinga2-monitoring