Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for multiple entry paths #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

danrough
Copy link


name: Support use of multiple paths in logrotate configuration.
about: The logroate configuration specification allows for multiple paths to be specified. This change enables that capability within this role.


Describe the change
In #16, @tazend adds this functionality, as well as the ability to handle multiple postrotate commands. I needed the ability to support multiple paths, but as yet I don't have the requirement to use multiple postrotate scripts. And so I thought I'd take what I needed from @tazend's change, and add it in a single PR, so that I could isolate that change from the postrotate stuff, thus making it easier for me to manage. Allows either an individual path, or multiple paths to be affected by the logrotate configuration specified.

Testing
I've added test cases for this, and been able to run verify against them:

molecule verify
WARNING  Driver docker does not provide a schema.
INFO     default scenario test matrix: verify
INFO     Performing prerun with role_name_check=0...
INFO     Running default > verify
INFO     Running Ansible Verifier
INFO     Sanity checks: 'docker'

PLAY [Verify] ******************************************************************

TASK [Run logrotate] ***********************************************************
changed: [logrotate-fedora-latest]

PLAY RECAP *********************************************************************
logrotate-fedora-latest    : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

INFO     Verifier completed successfully.

@danrough danrough force-pushed the feat/add-support-for-multiple-entry-paths branch from daebdda to e006ba6 Compare May 27, 2024 22:11
@pad92
Copy link

pad92 commented Jan 3, 2025

Hello,

you can do it with

path: |-
  /var/log/file1
  /var/log/file2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants