add a role for newsyslog
This commit is contained in:
parent
e784c5dcb4
commit
68463bf582
29
newsyslog/.travis.yml
Normal file
29
newsyslog/.travis.yml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
language: python
|
||||||
|
python: "2.7"
|
||||||
|
|
||||||
|
# Use the new container infrastructure
|
||||||
|
sudo: false
|
||||||
|
|
||||||
|
# Install ansible
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- python-pip
|
||||||
|
|
||||||
|
install:
|
||||||
|
# Install ansible
|
||||||
|
- pip install ansible
|
||||||
|
|
||||||
|
# Check ansible version
|
||||||
|
- ansible --version
|
||||||
|
|
||||||
|
# Create ansible.cfg with correct roles_path
|
||||||
|
- printf '[defaults]\nroles_path=../' >ansible.cfg
|
||||||
|
|
||||||
|
script:
|
||||||
|
# Basic role syntax check
|
||||||
|
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
5
newsyslog/README.md
Normal file
5
newsyslog/README.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Role Name
|
||||||
|
=========
|
||||||
|
|
||||||
|
Configure newsyslog by Evolix standard
|
||||||
|
|
15
newsyslog/files/newsyslog.conf
Normal file
15
newsyslog/files/newsyslog.conf
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# Syslog for Pack Evolix
|
||||||
|
# MANAGED BY ANSIBLE, MODIFICATIONS WILL BE LOST
|
||||||
|
# logfile_name owner:group mode count size when flags
|
||||||
|
/var/cron/log root:wheel 600 52 * 168 Z
|
||||||
|
/var/log/authlog root:wheel 640 52 * 168 Z
|
||||||
|
/var/log/daemon 640 52 * 168 Z
|
||||||
|
/var/log/lpd-errs 640 7 * 24 Z
|
||||||
|
/var/log/maillog 640 52 * 168 Z
|
||||||
|
/var/log/messages 644 52 * 168 Z
|
||||||
|
/var/log/secure 600 52 * 168 Z
|
||||||
|
/var/log/wtmp 644 7 * $W6D4 ZB
|
||||||
|
/var/log/xferlog 640 7 250 * Z
|
||||||
|
/var/log/pflog 600 3 250 * ZB "pkill -HUP -u root -U root -t - -x pflogd"
|
||||||
|
/var/www/logs/access.log 644 4 * $W0 Z "pkill -USR1 -u root -U root -x httpd"
|
||||||
|
/var/www/logs/error.log 644 7 250 * Z "pkill -USR1 -u root -U root -x httpd"
|
15
newsyslog/meta/main.yml
Normal file
15
newsyslog/meta/main.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
galaxy_info:
|
||||||
|
author: Evolix
|
||||||
|
description: Basic configuration of newsyslog
|
||||||
|
|
||||||
|
issue_tracker_url: https://forge.evolix.org/projects/ansible-roles/issues
|
||||||
|
|
||||||
|
license: GPLv2
|
||||||
|
|
||||||
|
min_ansible_version: 2.2
|
||||||
|
|
||||||
|
platforms:
|
||||||
|
- name: OpenBSD
|
||||||
|
versions:
|
||||||
|
- 6.1
|
||||||
|
|
7
newsyslog/tasks/main.yml
Normal file
7
newsyslog/tasks/main.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
#- include: debian.yml
|
||||||
|
# when: ansible_os_family == "Debian"
|
||||||
|
|
||||||
|
- include: openbsd.yml
|
||||||
|
when: ansible_os_family == "OpenBSD"
|
13
newsyslog/tasks/openbsd.yml
Normal file
13
newsyslog/tasks/openbsd.yml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
# no need to enable any daemon, it's run (by default) with cron(8)
|
||||||
|
- name: Configuring newsyslog
|
||||||
|
copy:
|
||||||
|
src: newsyslog.conf
|
||||||
|
dest: /etc/newsyslog.conf
|
||||||
|
owner: root
|
||||||
|
group: wheel
|
||||||
|
mode: "0644"
|
||||||
|
backup: yes
|
||||||
|
tags:
|
||||||
|
- log
|
||||||
|
- newsyslog
|
Loading…
Reference in a new issue