Compare commits

...

6 Commits

Author SHA1 Message Date
  Edoardo Putti 07a82e3247 draft for cloud storage 8 years ago
  Edoardo Putti 55bfeef774 format nginx role 8 years ago
  Edoardo Putti be6ba78edf add template for syslog client 8 years ago
  Edoardo Putti 6892dbc998 confiure central logger 8 years ago
  Edoardo Putti 50a711c735 create central log server, install rsyslog on every server 8 years ago
  Edoardo Putti 21458e6d25 draft for centralised logging 8 years ago
4 changed files with 80 additions and 1 deletions
Split View
  1. +49
    -0
      logger.yaml
  2. +27
    -0
      pydio.yaml
  3. +3
    -1
      roles/nginx/tasks/main.yaml
  4. +1
    -0
      templates/rsyslog_client.conf

+ 49
- 0
logger.yaml View File

@ -0,0 +1,49 @@
---
- hosts: biff
roles:
- role: lxc_guest
vm_name: 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

+ 27
- 0
pydio.yaml View File

@ -0,0 +1,27 @@
---
- hosts: biff
roles:
- role: lxc_guest
vm_name: pydio
vm_size: 30G
distro: stretch
- hosts: pydio
tasks:
- name: Add syncthing repo key
apt_key:
url: "https://syncthing.net/release-key.txt"
state: present
- name: Add syncthing
apt_repository:
repo: "deb http://apt.syncthing.net/ syncthing release"
state: present
- name: Install syncthing
apt:
name: syncthing
state: present
update_cache: yes
- name: Enable syncthing
service:
name: syncthing
state: started
enabled: yes

+ 3
- 1
roles/nginx/tasks/main.yaml View File

@ -7,7 +7,9 @@
- nginx
- name: disable nginx default configuration
file: path=/etc/nginx/sites-enabled/default state=absent
file:
path: /etc/nginx/sites-enabled/default
state: absent
notify: restart nginx
- name: install php5-fpm


+ 1
- 0
templates/rsyslog_client.conf View File

@ -0,0 +1 @@
*.* @{{ log_destination }}:514

Loading…
Cancel
Save