Giuseppe Lavagetto has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/365571 )
Change subject: sysctl::conffile: validate priority as numeric
......................................................................
sysctl::conffile: validate priority as numeric
Change-Id: I4ecfae0eecc86a85f9f1991fffeb4e1c433405ea
---
M modules/sysctl/manifests/conffile.pp
1 file changed, 2 insertions(+), 4 deletions(-)
Approvals:
Giuseppe Lavagetto: Looks good to me, approved
jenkins-bot: Verified
Volans: Looks good to me, but someone else must approve
diff --git a/modules/sysctl/manifests/conffile.pp
b/modules/sysctl/manifests/conffile.pp
index 1e80d13..815c11c 100644
--- a/modules/sysctl/manifests/conffile.pp
+++ b/modules/sysctl/manifests/conffile.pp
@@ -37,10 +37,8 @@
$priority = 70
) {
include ::sysctl
-
- if $priority !~ /^\d?\d$/ {
- fail("'priority' must be an integer between 0 - 99 (got:
${priority}).")
- }
+ # TODO/puppet4 Make this a type check
+ validate_numeric($priority, 99, 0)
$basename = regsubst($title, '\W', '-', 'G')
$filename = sprintf('/etc/sysctl.d/%02d-%s.conf', $priority, $basename)
--
To view, visit https://gerrit.wikimedia.org/r/365571
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4ecfae0eecc86a85f9f1991fffeb4e1c433405ea
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Volans <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits