ansible-role-mongo-logrotate
An Ansible role for installing and configuring
logrotate
for MongoDB hosts.
Requirements
IMPORTANT: In order for this log rotation to work correctly, your
mongod configuration file (typically found in /etc/mongod.conf
)
must contain the following settings:
systemLog:
logRotate: reopen
processManagement:
pidFilePath: /var/run/mongodb/mongod.pid
Role Variables
None.
Dependencies
None.
Example Playbook
Here's how to use it in a playbook:
- hosts: all
become: true
become_method: sudo
tasks:
- name: Configure logrotate for MongoDB
ansible.builtin.include_role:
name: mongo_logrotate
Contributing
We welcome contributions! Please see CONTRIBUTING.md
for
details.
License
This project is in the worldwide public domain.
This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.
All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.
Author Information
David Redmin [email protected]