Playbooks to a new Lilik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

52 lines
991 B

---
- 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