Skip to content

Commit

Permalink
enforce Array[String] data type for queryhosts
Browse files Browse the repository at this point in the history
The conversion from ERB to EPP in voxpupuli#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: ['']
  • Loading branch information
kenyon committed Nov 16, 2020
1 parent d961399 commit f0fea09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f0fea09

Please sign in to comment.