summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZen Fu <zen@systemli.org>2019-07-31 11:08:21 -0300
committerZen Fu <zen@systemli.org>2019-07-31 11:23:03 -0300
commitb8e2c4cb1028863c39d0c4f47144dd8b26888042 (patch)
tree4739359d28fb0a18c595119254074499f7294a70
parentefb119b0ab2a173b152a5850eeb320c34247a282 (diff)
Check dhparam size using puppet type checksfeature16460
validate_integer() is deprecated.
-rw-r--r--manifests/dhparam.pp4
1 files changed, 1 insertions, 3 deletions
diff --git a/manifests/dhparam.pp b/manifests/dhparam.pp
index d5a3193..cd3f95f 100644
--- a/manifests/dhparam.pp
+++ b/manifests/dhparam.pp
@@ -2,14 +2,12 @@
define tails::dhparam (
Enum['present', 'absent'] $ensure = 'present',
Stdlib::Absolutepath $path = $name,
- Integer $size = 2048,
+ Integer[1, default] $size = 2048,
Pattern[/\A[a-z_]+\z/] $owner = 'root',
Pattern[/\A[a-z_]+\z/] $group = 'root',
Stdlib::Filemode $mode = '0644',
) {
- validate_integer($size, '', 1) # positive integer
-
exec { "generate_dhparam_${path}":
command => "openssl dhparam -out ${path} ${size}",
user => $owner,