{"id":21400341,"url":"https://github.com/oefenweb/ansible-logrotated","last_synced_at":"2025-08-22T10:15:26.756Z","repository":{"id":49438153,"uuid":"41745820","full_name":"Oefenweb/ansible-logrotated","owner":"Oefenweb","description":"Ansible role to manage logrotate and logrotate.d in Debian-like systems","archived":false,"fork":false,"pushed_at":"2023-11-02T11:04:32.000Z","size":87,"stargazers_count":7,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T15:55:20.756Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Oefenweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-09-01T15:10:28.000Z","updated_at":"2022-06-18T04:12:19.000Z","dependencies_parsed_at":"2025-03-16T15:55:29.432Z","dependency_job_id":"45ff27b9-beb8-4063-9812-96c741a17633","html_url":"https://github.com/Oefenweb/ansible-logrotated","commit_stats":null,"previous_names":[],"tags_count":53,"template":false,"template_full_name":null,"purl":"pkg:github/Oefenweb/ansible-logrotated","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-logrotated","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-logrotated/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-logrotated/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-logrotated/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Oefenweb","download_url":"https://codeload.github.com/Oefenweb/ansible-logrotated/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-logrotated/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271620693,"owners_count":24791584,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T15:21:13.692Z","updated_at":"2025-08-22T10:15:26.706Z","avatar_url":"https://github.com/Oefenweb.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"## logrotated\n\n[![Build Status](https://travis-ci.org/Oefenweb/ansible-logrotated.svg?branch=master)](https://travis-ci.org/Oefenweb/ansible-logrotated) [![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-logrotated-blue.svg)](https://galaxy.ansible.com/Oefenweb/logrotated)\n\nManage logrotated.d in Debian-like systems.\n\n#### Requirements\n\nNone\n\n#### Variables\n\n* `logrotated_logrotate_d_files` [default: `{}`]: `/etc/logrotated.d/*` A list of application-specific file declarations\n* `logrotated_logrotate_d_files.key`: The name of the logrotated configuration file (e.g `apache2`)\n* `logrotated_logrotate_d_files.key.{n}` [optional, default: `[]`]: A section declaration\n* `logrotated_logrotate_d_files.key.{n}.logs` [default: `[]`]: The log files for this section\n* `logrotated_logrotate_d_files.key.{n}.size` [optional]: Rotate logs when they reach this size\n* `logrotated_logrotate_d_files.key.{n}.daily` [optional]: Whether or not log files are rotated every day\n* `logrotated_logrotate_d_files.key.{n}.weekly` [optional]: Whether or not log files are rotated weekly\n* `logrotated_logrotate_d_files.key.{n}.monthly` [optional]: Whether or not log files are rotated monthly\n* `logrotated_logrotate_d_files.key.{n}.yearly` [optional]: Whether or not log files are rotated yearly\n* `logrotated_logrotate_d_files.key.{n}.missingok` [optional]: Whether or not to go on to the next log file without issuing an error message when the  log  file is missing\n* `logrotated_logrotate_d_files.key.{n}.rotate` [optional]: Number of times log files are rotated (before being removed)\n* `logrotated_logrotate_d_files.key.{n}.compress` [optional]: Whether or not old versions of log files are compressed\n* `logrotated_logrotate_d_files.key.{n}.delaycompress` [optional]: Whether or not to postpone compression of the previous log file to the next rotation cycle\n* `logrotated_logrotate_d_files.key.{n}.copytruncate` [optional]: Whether or not to truncate the original log file to zero size in place after creating a copy\n* `logrotated_logrotate_d_files.key.{n}.notifempty` [optional]: Whether or not to not rotate the log if it is empty\n* `logrotated_logrotate_d_files.key.{n}.create` [optional]: Whether or not the log file is created immediately after rotation wit the given mode, owner and group\n* `logrotated_logrotate_d_files.key.{n}.sharedscripts` [optional]: Whether or not the scripts are only run once, no matter how many logs match the wildcarded  pattern\n* `logrotated_logrotate_d_files.key.{n}.scripts` [optional, default: `{}`]: A hash of scripts\n* `logrotated_logrotate_d_files.key.{n}.scripts.key` [required]: Action to run the script (e.g `postrotate`)\n* `logrotated_logrotate_d_files.key.{n}.scripts.key.{n}` [default: `[]`]: List of lines with directives to execute\n\n## Dependencies\n\nNone\n\n#### Example(s)\n\n##### Simple configuration\n\n```yaml\n---\n- hosts: all\n  roles:\n    - oefenweb.logrotated\n```\n\n##### Complex configuration\n\n```yaml\n---\n- hosts: all\n  roles:\n    - oefenweb.logrotated\n  vars:\n    logrotated_logrotate_d_files:\n      apache2:\n        - logs:\n            - '/var/log/apache2/*.log'\n          weekly: true\n          missingok: true\n          rotate: 52\n          compress: true\n          delaycompress: true\n          notifempty: true\n          create: '640 root adm'\n          sharedscripts: true\n          scripts:\n            postrotate:\n              - 'if /etc/init.d/apache2 status \u003e /dev/null ; then \\'\n              - '  /etc/init.d/apache2 reload \u003e /dev/null; \\'\n              - 'fi;'\n            prerotate:\n              - 'if [ -d /etc/logrotate.d/httpd-prerotate ]; then \\'\n              - '  run-parts /etc/logrotate.d/httpd-prerotate; \\'\n              - 'fi;'\n```\n\n#### License\n\nMIT\n\n#### Author Information\n\n* Mark van Driel\n* Mischa ter Smitten\n\n#### Feedback, bug-reports, requests, ...\n\nAre [welcome](https://github.com/Oefenweb/ansible-logrotated/issues)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foefenweb%2Fansible-logrotated","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foefenweb%2Fansible-logrotated","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foefenweb%2Fansible-logrotated/lists"}