diff --git a/manifests/init.pp b/manifests/init.pp index 357abf28..c80df2ec 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -39,7 +39,7 @@ } # Validate node_ttl - validate_re ($node_ttl_real, ['^(\d)+[s,m,d]$'], "node_ttl is <${node_ttl}> which does not match the regex validation") + validate_re ($node_ttl_real, ['^\d+(d|h|m|s|ms)$'], "node_ttl is <${node_ttl}> which does not match the regex validation") # Apply necessary suffix if zero is specified. if $node_purge_ttl == '0' { @@ -49,7 +49,7 @@ } # Validate node_purge_ttl - validate_re ($node_purge_ttl_real, ['^(\d)+[s,m,d]$'], "node_purge_ttl is <${node_purge_ttl}> which does not match the regex validation") + validate_re ($node_purge_ttl_real, ['^\d+(d|h|m|s|ms)$'], "node_purge_ttl is <${node_purge_ttl}> which does not match the regex validation") # Apply necessary suffix if zero is specified. if $report_ttl == '0' { @@ -59,7 +59,7 @@ } # Validate report_ttl - validate_re ($report_ttl_real, ['^(\d)+[s,m,d]$'], "report_ttl is <${report_ttl}> which does not match the regex validation") + validate_re ($report_ttl_real, ['^\d+(d|h|m|s|ms)$'], "report_ttl is <${report_ttl}> which does not match the regex validation") # Validate puppetdb_service_status if !($puppetdb_service_status in ['true', 'running', 'false', 'stopped']) { diff --git a/manifests/server.pp b/manifests/server.pp index 0815e2be..3af325ec 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -38,7 +38,7 @@ } # Validate node_ttl - validate_re ($node_ttl_real, ['^(\d)+[s,m,d]$'], "node_ttl is <${node_ttl}> which does not match the regex validation") + validate_re ($node_ttl_real, ['^\d+(d|h|m|s|ms)$'], "node_ttl is <${node_ttl}> which does not match the regex validation") # Apply necessary suffix if zero is specified. if $node_purge_ttl == '0' { @@ -48,7 +48,7 @@ } # Validate node_purge_ttl - validate_re ($node_purge_ttl_real, ['^(\d)+[s,m,d]$'], "node_purge_ttl is <${node_purge_ttl}> which does not match the regex validation") + validate_re ($node_purge_ttl_real, ['^\d+(d|h|m|s|ms)$'], "node_purge_ttl is <${node_purge_ttl}> which does not match the regex validation") # Apply necessary suffix if zero is specified. if $report_ttl == '0' { @@ -58,7 +58,7 @@ } # Validate report_ttl - validate_re ($report_ttl_real, ['^(\d)+[s,m,d]$'], "report_ttl is <${report_ttl}> which does not match the regex validation") + validate_re ($report_ttl_real, ['^\d+(d|h|m|s|ms)$'], "report_ttl is <${report_ttl}> which does not match the regex validation") # Validate puppetdb_service_status if !($puppetdb_service_status in ['true', 'running', 'false', 'stopped']) {