arillso.logrotate
Rol de Ansible: logrotate
Descripción
Instala y configura logrotate.
Instalación
ansible-galaxy install arillso.logrotate
Requisitos
Ninguno.
Variables del Rol
incluir archivos
Ruta a los archivos incluidos.
logrotate_include_dir: /etc/logrotate.d
logrotate_global_config
Habilitar/deshabilitar la configuración global de /etc/logrotate.conf
.
logrotate_global_config: true
logrotate_use_hourly_rotation
Habilitar/deshabilitar la rotación horaria con cron.
logrotate_use_hourly_rotation: false
opciones de logrotate
Lista de opciones globales.
logrotate_options:
- weekly
- rotate 4
- create
- dateext
- su root syslog
Paquete
Nombre del paquete para instalar logrotate
.
logrotate_package: logrotate
configuración predeterminada
Logrotate para wtmp
:
logrotate_wtmp_enable: true
logrotate_wtmp:
logs:
- /var/log/wtmp
options:
- missingok
- monthly
- create 0664 root utmp
- rotate 1
Logrotate para btmp
:
logrotate_btmp_enable: true
logrotate_btmp:
logs:
- /var/log/btmp
options:
- missingok
- monthly
- create 0660 root utmp
- rotate 1
Configuración de Aplicaciones
Se pueden agregar más archivos de registro que se rotarán.
logrotate_applications: []
Ejemplo
Las siguientes opciones están disponibles.
logrotate_applications:
- name: nombre-de-tu-aplicación-log-rotate
definitions:
- logs:
- /var/log/apt/term.log
- /var/log/apt/history.log
options:
- su user group
- rotate 12
- monthly
- missingok
- notifempty
postrotate:
- /ruta/a/algun/script
Dependencias
Ninguna
Ejemplo de Playbook
- hosts: all
roles:
- arillso.logrotate
Autor
Licencia
Este proyecto está bajo la Licencia MIT. Consulta el archivo LICENSE para el texto completo de la licencia.
Derechos de Autor
(c) 2019, Arillso
Acerca del proyecto
Ansible role for installs and configures logratet on Linux
Instalar
ansible-galaxy install arillso.logrotate
Licencia
mit
Descargas
1.2M
Propietario