{"id":15878800,"url":"https://github.com/darkwizard242/ansible-role-logrotate","last_synced_at":"2026-02-01T03:38:25.993Z","repository":{"id":44531216,"uuid":"251669634","full_name":"darkwizard242/ansible-role-logrotate","owner":"darkwizard242","description":"Ansible role for Logrotate. Available on Ansible Galaxy. ","archived":false,"fork":false,"pushed_at":"2024-06-26T22:01:59.000Z","size":33,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-19T02:50:31.359Z","etag":null,"topics":["ansible","ansible-galaxy","ansible-role","linux","logrotate","logrotate-utility","system"],"latest_commit_sha":null,"homepage":"https://galaxy.ansible.com/darkwizard242/logrotate","language":"Python","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/darkwizard242.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2020-03-31T16:50:26.000Z","updated_at":"2024-06-26T22:01:46.000Z","dependencies_parsed_at":"2024-05-06T19:41:21.322Z","dependency_job_id":"485f3e37-d598-4a16-aec3-e5388bf9aa4a","html_url":"https://github.com/darkwizard242/ansible-role-logrotate","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/darkwizard242/ansible-role-logrotate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkwizard242%2Fansible-role-logrotate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkwizard242%2Fansible-role-logrotate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkwizard242%2Fansible-role-logrotate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkwizard242%2Fansible-role-logrotate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darkwizard242","download_url":"https://codeload.github.com/darkwizard242/ansible-role-logrotate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkwizard242%2Fansible-role-logrotate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28966812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T02:14:24.993Z","status":"ssl_error","status_checked_at":"2026-02-01T02:13:55.706Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ansible","ansible-galaxy","ansible-role","linux","logrotate","logrotate-utility","system"],"created_at":"2024-10-06T02:41:54.328Z","updated_at":"2026-02-01T03:38:25.979Z","avatar_url":"https://github.com/darkwizard242.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![build-test](https://github.com/darkwizard242/ansible-role-logrotate/workflows/build-and-test/badge.svg?branch=master)](https://github.com/darkwizard242/ansible-role-logrotate/actions?query=workflow%3Abuild-and-test) [![release](https://github.com/darkwizard242/ansible-role-logrotate/workflows/release/badge.svg)](https://github.com/darkwizard242/ansible-role-logrotate/actions?query=workflow%3Arelease) ![Ansible Role](https://img.shields.io/ansible/role/d/darkwizard242/logrotate) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=ansible-role-logrotate\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=ansible-role-logrotate) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=ansible-role-logrotate\u0026metric=reliability_rating)](https://sonarcloud.io/dashboard?id=ansible-role-logrotate) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=ansible-role-logrotate\u0026metric=security_rating)](https://sonarcloud.io/dashboard?id=ansible-role-logrotate) ![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/darkwizard242/ansible-role-logrotate?label=release) ![GitHub repo size](https://img.shields.io/github/repo-size/darkwizard242/ansible-role-logrotate?color=orange\u0026style=flat-square)\n\n# Ansible Role: logrotate\n\nRole to install (_by default_) [logrotate](https://github.com/logrotate/logrotate) package or uninstall (_if passed as var_) as well as configure for any number of logrotate configurations on **Debian** based and **EL** based systems.\n\n## Requirements\n\nNone.\n\n## Role Variables\n\nAvailable variables are listed below (located in `defaults/main.yml`):\n\n### Variables list:\n\n```yaml\nlogrotate_app: logrotate\nlogrotate_desired_state: present\nlogrotate_config_dir: /etc/logrotate.d\nlogrotate_configs: []\nlogrotate_template: conf.j2\n```\n\n### Variables table:\n\nVariable                | Description\n----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------\nlogrotate_app           | Defines the app to install i.e. **logrotate**\nlogrotate_desired_state | Defined to dynamically chose whether to install (i.e. either `present` or `latest`) or uninstall (i.e. `absent`) the package. Defaults to `present`.\nlogrotate_config_dir    | Directory to place logrotate configuration into i.e. **/etc/logrotate.d**\nlogrotate_configs       | Pass desired logrotate configurations. Playbook example provided.\nlogrotate_template      | Template used as source.\n\n## Dependencies\n\nNone\n\n## Example Playbook\n\nFor default behaviour of role (i.e. installation of **logrotate** package) in ansible playbooks.\n\n```yaml\n- hosts: servers\n  roles:\n    - darkwizard242.logrotate\n```\n\nFor customizing behavior of role (i.e. custom config of **logrotate** ) in ansible playbooks.\n\n```yaml\n- hosts: servers\n  roles:\n    - darkwizard242.logrotate\n  vars:\n    logrotate_configs:\n      - name: ansible\n        path: /var/log/ansible.log\n        options:\n          - weekly\n          - create 0644 root root\n          - size 10M\n          - rotate 5\n          - dateext\n          - dateformat -%Y_%m_%d\n          - notifempty\n          - missingok\n          - compress\n          - delaycompress\n          - copytruncate\n```\n\nFor customizing behavior of role (i.e. custom config and postrotate scripts of **logrotate** ) in ansible playbooks.\n\n```yaml\n- hosts: servers\n  roles:\n    - darkwizard242.logrotate\n  vars:\n    logrotate_configs:\n      - name: ansible\n        path: /var/log/ansible.log\n        options:\n          - weekly\n          - create 0644 root root\n          - size 10M\n          - rotate 5\n          - dateext\n          - dateformat -%Y_%m_%d\n          - notifempty\n          - missingok\n          - compress\n          - delaycompress\n          - copytruncate\n\n      - name: ansible-script\n        path: /var/log/ansible.log\n        options:\n          - weekly\n          - create 0644 root root\n          - size 10M\n          - rotate 5\n          - dateext\n          - dateformat -%Y_%m_%d\n          - notifempty\n          - missingok\n          - compress\n          - delaycompress\n          - copytruncate\n        scripts:\n          postrotate: 'echo \"Ansible log has been rotated\" \u003e ~/rotation.txt'\n```\n\n## License\n\n[MIT](https://github.com/darkwizard242/ansible-role-logrotate/blob/master/LICENSE)\n\n## Author Information\n\nThis role was created by [Ali Muhammad](https://www.alimuhammad.dev/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkwizard242%2Fansible-role-logrotate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarkwizard242%2Fansible-role-logrotate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkwizard242%2Fansible-role-logrotate/lists"}