logrotate with path testing #1
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
todo 🗒️
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: stationgroup/ansible-logrotate-plusplus#1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
I need a logrotate role that can test if paths exist before writing a logrotate config to the server. I want to load the roles default vars with custom paths and per path parameters, so I can run the playbook across a dynamic infrastructure and only write logerotate rules to the appropriate system with the correct paths present.
The ansible-galaxy role that was immediately intuitive to me was weareinteractive/ansible-logrotate. If you find another role and you think that will do what I wan't let me know. Otherwise I need to modify an existing role.
Example
Based on weareinteractive/ansible-logrotate; Here is an example of what I imagine I would put in
defaults/main.yml
.If I'm remembering correctly, the last time I tried this with weareinteractive/ansible-logrotate I ended up creating nextcloud log rotation rules on systems that don't have those directories.
x-post: https://github.com/stationgroup/ansible-logrotate-plusplus/pull/2
Two other suiting roles: