ageres210784.logrotate
Ansible Rôle : logrotate
Description
Installe et configure logrotate.
Installation
ansible-galaxy install arillso.logrotate
Exigences
Aucune.
Variables de rôle
fichiers inclus
Chemin vers les fichiers inclus.
logrotate_include_dir: /etc/logrotate.d
logrotate_global_config
Activer/désactiver la configuration globale de /etc/logrotate.conf
.
logrotate_global_config: true
logrotate_use_hourly_rotation
Activer/désactiver la rotation horaire avec cron.
logrotate_use_hourly_rotation: false
Activer la rotation horaire avec systemd pour Ubuntu >= focal. logrotate_use_hourly_rotation doit être vrai.
logrotate_timer:
options:
- OnCalendar=hourly
- Persistent=true
options logrotate
Liste des options globales.
logrotate_options:
- weekly
- rotate 4
- create
- dateext
- su root syslog
Paquet
Nom du paquet à installer logrotate
.
logrotate_package: logrotate
configuration par défaut
Logrotate pour wtmp
:
logrotate_wtmp_enable: true
logrotate_wtmp:
logs:
- /var/log/wtmp
options:
- missingok
- monthly
- create 0664 root utmp
- rotate 1
Logrotate pour btmp
:
logrotate_btmp_enable: true
logrotate_btmp:
logs:
- /var/log/btmp
options:
- missingok
- monthly
- create 0660 root utmp
- rotate 1
Configuration des applications
D'autres fichiers journaux peuvent être ajoutés pour être gérés par logrotate.
logrotate_applications: []
Exemple
Les options suivantes sont disponibles.
logrotate_applications:
- name: nom-de-votre-application-de-log-rotate
definitions:
- logs:
- /var/log/apt/term.log
- /var/log/apt/history.log
options:
- su user group
- rotate 12
- monthly
- missingok
- notifempty
postrotate:
- /path/to/some/script
Dépendances
Aucune
Exemple de Playbook
- hosts: all
roles:
- arillso.logrotate
Auteur
Licence
Ce projet est sous la licence MIT. Voir le fichier LICENSE pour le texte complet de la licence.
Copyright
(c) 2019, Arillso
À propos du projet
Ansible role for installs and configures logratet on Linux
Installer
ansible-galaxy install ageres210784.logrotate
Licence
mit
Téléchargements
173
Propriétaire