From c5cb03d3a03735802066907c1a648d177a0663e1 Mon Sep 17 00:00:00 2001
From: 12ww1160 <12ww1160@confdroid.com>
Date: Mon, 2 Feb 2026 21:52:25 +0100
Subject: [PATCH] OP#233 add variable for puppetdb logs max age
---
manifests/params.pp | 2 ++
templates/puppetdb/logback.xml.erb | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/manifests/params.pp b/manifests/params.pp
index 82da5ae..887b7ab 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -64,6 +64,7 @@
# @param [String] pt_pptdb_ca_crt placeholder for the ca.crt
# @param [String] pt_pptdb_server_crt placeholder for the server.crt
# @param [String] pt_pptdb_server_key placeholder for the server.crt
+# @param [String] pt_pptdb_log_max_age the max age for puppetdb logs in days
###############################################################################
class confdroid_puppet::params (
@@ -121,6 +122,7 @@ class confdroid_puppet::params (
String $pt_pptdb_ca_crt = 'Changeme',
String $pt_pptdb_server_crt = 'Changeme',
String $pt_pptdb_server_key = 'Changeme',
+ String $pt_pptdb_log_max_age = '30',
## jetty
String $pt_http_port = '8080',
diff --git a/templates/puppetdb/logback.xml.erb b/templates/puppetdb/logback.xml.erb
index fb31aad..d13542e 100644
--- a/templates/puppetdb/logback.xml.erb
+++ b/templates/puppetdb/logback.xml.erb
@@ -31,7 +31,7 @@
/var/log/puppetlabs/puppetdb/puppetdb-status-%d{yyyy-MM-dd}.%i.log.gz
200MB
- 90
+ <%= @pt_pptdb_log_max_age %>
1GB