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

Add support for Ubuntu 14.04 LTS #32

Closed
wants to merge 1 commit 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
2 changes: 1 addition & 1 deletion manifests/base.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
'/etc/logrotate.conf':
ensure => file,
mode => '0444',
source => 'puppet:///modules/logrotate/etc/logrotate.conf';
content => template('logrotate/etc/logrotate.conf.erb');
'/etc/logrotate.d':
ensure => directory,
mode => '0755';
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
'owner' => 'root',
'group' => 'root',
'mode' => '0444',
'source' => 'puppet:///modules/logrotate/etc/logrotate.conf',
'content' => /# THIS FILE IS AUTOMATICALLY DISTRIBUTED BY PUPPET. ANY CHANGES WILL BE/,
'require' => 'Package[logrotate]',
})

Expand Down
6 changes: 6 additions & 0 deletions files/etc/logrotate.conf → templates/etc/logrotate.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
# rotate log files weekly
weekly

<% if @lsbmajdistrelease and (scope.function_versioncmp([@lsbmajdistrelease, '14']) >= 0) -%>
Copy link
Owner

Choose a reason for hiding this comment

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

You should also check lsbdistid to ensure that this only applies to Ubuntu > 14.

Copy link
Author

Choose a reason for hiding this comment

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

Why do I need to check both?

Copy link
Author

Choose a reason for hiding this comment

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

@rodjek Ping

Copy link

Choose a reason for hiding this comment

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

You want to check both to insure that this change doesn't happen on distros other than Ubuntu. I.e. this would incorrectly be applied to Fedora releases > 14.

# use the syslog group by default, since this is the owning group
# # of /var/log/syslog.
su root syslog
<%- end -%>

# keep 4 weeks worth of backlogs
rotate 4

Expand Down