From f3f7386c8280ca8e9e4b619cc6b1c8e93dfbab70 Mon Sep 17 00:00:00 2001 From: Kenyon Ralph Date: Mon, 16 Nov 2020 01:14:39 -0800 Subject: [PATCH 1/3] chrony_spec.rb: fix Archlinux typo --- spec/classes/chrony_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/classes/chrony_spec.rb b/spec/classes/chrony_spec.rb index 88ee901..5267803 100644 --- a/spec/classes/chrony_spec.rb +++ b/spec/classes/chrony_spec.rb @@ -141,7 +141,7 @@ context 'chrony::config' do case facts[:os]['family'] - when 'Archinux' + when 'Archlinux' context 'with some params passed in' do it { is_expected.to contain_file('/etc/chrony.conf').with_content(%r{^\s*port 123$}) } it { is_expected.to contain_file('/etc/chrony.conf').with_content(%r{^s*allow 192\.168\/16$}) } From d1b5a53ec0dee734c7c5bf3c75379d6e72b94d84 Mon Sep 17 00:00:00 2001 From: Kenyon Ralph Date: Mon, 16 Nov 2020 01:59:21 -0800 Subject: [PATCH 2/3] enforce Array[String] data type for queryhosts The conversion from ERB to EPP in #79 changed the behavior of queryhosts slightly. Before, setting queryhosts to the empty string worked for configuring chrony to allow any query. After, empty string is considered empty, so the "allow" directive would not be rendered. Enforcing the data type ensures that people upgrading this module who have been using empty string get an error rather than a valid but misconfigured chrony.conf. The replacement for empty string is an array with a single empty string element: [''] --- REFERENCE.md | 2 +- manifests/init.pp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 2aeba9f..568629f 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -369,7 +369,7 @@ Default value: `3` ##### `queryhosts` -Data type: `Any` +Data type: `Array[String]` This adds the networks, hosts that are allowed to query the daemon. diff --git a/manifests/init.pp b/manifests/init.pp index 318709d..e2050ce 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -211,7 +211,7 @@ Variant[Hash,Array[Stdlib::Fqdn]] $pools = {}, Numeric $makestep_seconds = 10, Integer $makestep_updates = 3, - $queryhosts = [], + Array[String] $queryhosts = [], Optional[String[1]] $mailonchange = undef, Float $threshold = 0.5, Boolean $lock_all = false, From ea71bb65922736ebc6b7d40827148b8ac26d57ed Mon Sep 17 00:00:00 2001 From: Kenyon Ralph Date: Mon, 16 Nov 2020 14:06:41 -0800 Subject: [PATCH 3/3] remove obsolete vscode extensions.json This file shouldn't be in the repository. Its existence in the repository causes rake test to fail if you have this gitignored. This isn't the current name of the puppet vscode extension, and it's not necessary to have this file anyway. --- .vscode/extensions.json | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .vscode/extensions.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 6177782..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "recommendations": [ - "jpogran.puppet-vscode", - "rebornix.Ruby" - ] -}