ansible.logrotate
ansible.logrotate copied to clipboard
Installs and configures logrotate
This change fixes the warning in ansible 2.6.5 regarding the state parameter in the module `file`. ``` TASK [ansible_role_logrotate : Symlink for hourly rotation] ******************** [WARNING]: The src option requires...
The files under /etc/cron.d do not need to be executable, while the files under /etc/cron.hourly, /etc/cron.daily, /etc/cron.weekly and /etc/cron.monthly do, as they are run by run-parts command ( see: https://www.cyberciti.biz/cloud-computing/why-is-my-linux-unix-crontab-job-not-working/...
I use pre-commit and this fixes some of the errors found by yamllint and ansible-lint. ```yaml - repo: https://github.com/adrienverge/yamllint.git rev: v1.27.1 hooks: - id: yamllint files: \.(yaml|yml)$ types: [file, yaml]...
would be great to add prerotate :) ,thanks.
Added default configuration file for manage Almalinux OS when using ansible-galaxy
After configuring daily rotation for an application log file using your module nothing was rotated. /home/appuser/logs/webserver/*.log /home/appuser/logs/misc/*.log { copytruncate daily create 0644 appuser appuser dateyesterday rotate 30 missingok } It's...
This helps in avoiding "item" name clashes when using this role inside another one that already contains a loop with the default name "item"
Use case: 1. Set `logrotate_use_hourly_rotation` to true and run role 2. Symlink `/etc/cron.hourly/logrotate` gets created 3. Now set `logrotate_use_hourly_rotation` to false again 4. Symlink `/etc/cron.hourly/logrotate` does not get removed