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 log_options for logging support #31

Merged
merged 1 commit into from Sep 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -159,6 +159,10 @@ This determines which template puppet should use for the chrony key file.

An array of key lines. These are printed as-is into the chrony key file.

#### `log_options`

Specify which information is to be logged.

#### `package_ensure`

This can be set to 'present' or 'latest' or a specific version to choose the
Expand Down
1 change: 1 addition & 0 deletions manifests/config.pp
Expand Up @@ -10,6 +10,7 @@
$config_keys_manage = $chrony::config_keys_manage,
$chrony_password = $chrony::chrony_password,
$keys = $chrony::keys,
$log_options = $chrony::log_options,
$refclocks = $chrony::refclocks,
$mailonchange = $chrony::mailonchange,
$threshold = $chrony::threshold,
Expand Down
1 change: 1 addition & 0 deletions manifests/init.pp
Expand Up @@ -10,6 +10,7 @@
$config_keys_mode = $chrony::params::config_keys_mode,
$config_keys_manage = $chrony::params::config_keys_manage,
$keys = $chrony::params::keys,
$log_options = $chrony::params::log_options,
$package_ensure = $chrony::params::package_ensure,
$package_name = $chrony::params::package_name,
$refclocks = $chrony::params::refclocks,
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
@@ -1,6 +1,7 @@
class chrony::params {
$commandkey = 0
$keys = []
$log_options = undef
$package_ensure = 'present'
$refclocks = []
$service_enable = true
Expand Down
4 changes: 3 additions & 1 deletion templates/chrony.conf.debian.erb
Expand Up @@ -58,7 +58,9 @@ mailonchange <%= @mailonchange %> <%= @threshold %>
<% end -%>

logdir /var/log/chrony
#log measurements statistics tracking
<%- if defined?(@log_options) -%>
log <%= @log_options %>
<%- end -%>

<% Array(@refclocks).each do |refclock| -%>
refclock <%= refclock %>
Expand Down
4 changes: 3 additions & 1 deletion templates/chrony.conf.redhat.erb
Expand Up @@ -58,7 +58,9 @@ mailonchange <%= @mailonchange %> <%= @threshold %>
<% end -%>

logdir /var/log/chrony
#log measurements statistics tracking
<%- if defined?(@log_options) -%>
log <%= @log_options %>
<%- end -%>

<% Array(@refclocks).each do |refclock| -%>
refclock <%= refclock %>
Expand Down