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

Convert template for chrony.keys from erb to epp #83

Merged
merged 1 commit into from
Jul 11, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
owner => $config_keys_owner,
group => $config_keys_group,
mode => $config_keys_mode,
content => Sensitive(template($config_keys_template)),
content => Sensitive(epp($config_keys_template)),
}

}
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
Stdlib::Unixpath $config = $chrony::params::config,
String[1] $config_template = 'chrony/chrony.conf.epp',
Stdlib::Unixpath $config_keys = $chrony::params::config_keys,
String[1] $config_keys_template = 'chrony/chrony.keys.erb',
String[1] $config_keys_template = 'chrony/chrony.keys.epp',
String[1] $chrony_password = 'xyzzy',
Variant[Integer[0],String[1]] $config_keys_owner = $chrony::params::config_keys_owner,
Variant[Integer[0],String[1]] $config_keys_group = $chrony::params::config_keys_group,
Expand Down
6 changes: 6 additions & 0 deletions templates/chrony.keys.epp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<% if $chrony::chrony_password and $chrony::chrony_password != 'unset' { -%>
<%= $chrony::commandkey %> <%= $chrony::chrony_password %>
<% } -%>
<% $chrony::keys.each |$line| { -%>
Copy link
Contributor

Choose a reason for hiding this comment

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

are keys guaranteed to be at least []?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question. Yes, the required type defined in init.pp for $keys is Array[String[1]]

<%= $line %>
<% } -%>
6 changes: 0 additions & 6 deletions templates/chrony.keys.erb

This file was deleted.