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

Feature/skip global config #28

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ Path to the imclude files.
logrotate_include_dir: /etc/logrotate.d
```

### logrotate_global_config

Enable global configuration of /etc/logrotate.conf

```yml
logrotate_global_config: True
```

### logrotate_use_hourly_rotation

Enable hourly rotation with cron.
Expand Down
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ logrotate_btmp:
- create 0660 root utmp
- rotate 1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be awesome to have the comment here as well, even just copying directly from the README (so that you can reason about settings based on the config files alone).

logrotate_global_config: True

# More log files can be added that will log rotate.
# An example of multiple log rotate applications with available settings:
# logrotate_applications:
Expand Down
1 change: 1 addition & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
mode: 0644
tags:
- configuration
when: logrotate_global_config | bool

- name: 'create logrotate application configuration files'
become: true
Expand Down