From e9aa4f2073c4d8ce711b6264cfca9145291fc394 Mon Sep 17 00:00:00 2001 From: Christer Ekholm Date: Sat, 11 Jul 2020 14:31:03 +0200 Subject: [PATCH] Convert template for chrony.keys from erb to epp --- manifests/config.pp | 2 +- manifests/init.pp | 2 +- templates/chrony.keys.epp | 6 ++++++ templates/chrony.keys.erb | 6 ------ 4 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 templates/chrony.keys.epp delete mode 100644 templates/chrony.keys.erb diff --git a/manifests/config.pp b/manifests/config.pp index 0f53614..2024bea 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -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)), } } diff --git a/manifests/init.pp b/manifests/init.pp index cd4833e..bb9d60a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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, diff --git a/templates/chrony.keys.epp b/templates/chrony.keys.epp new file mode 100644 index 0000000..b9544c6 --- /dev/null +++ b/templates/chrony.keys.epp @@ -0,0 +1,6 @@ +<% if $chrony::chrony_password and $chrony::chrony_password != 'unset' { -%> +<%= $chrony::commandkey %> <%= $chrony::chrony_password %> +<% } -%> +<% $chrony::keys.each |$line| { -%> +<%= $line %> +<% } -%> diff --git a/templates/chrony.keys.erb b/templates/chrony.keys.erb deleted file mode 100644 index 1a0e590..0000000 --- a/templates/chrony.keys.erb +++ /dev/null @@ -1,6 +0,0 @@ -<% if @chrony_password and @chrony_password != 'unset' -%> -<%= @commandkey %> <%= @chrony_password %> -<% end -%> -<% if @keys then Array(@keys).each do |line| -%> -<%= line %> -<% end end -%>