diff --git a/sysutils/puppet-agent/Makefile b/sysutils/puppet-agent/Makefile
index 49d767c9d..a7112f55c 100644
--- a/sysutils/puppet-agent/Makefile
+++ b/sysutils/puppet-agent/Makefile
@@ -1,6 +1,5 @@
PLUGIN_NAME= puppet-agent
-PLUGIN_VERSION= 1.0
-PLUGIN_REVISION= 1
+PLUGIN_VERSION= 1.1
PLUGIN_COMMENT= Manage Puppet Agent
PLUGIN_DEPENDS= puppet7 py${PLUGIN_PYTHON}-opn-cli
PLUGIN_MAINTAINER= jan.wink93@gmail.com
diff --git a/sysutils/puppet-agent/pkg-descr b/sysutils/puppet-agent/pkg-descr
index 64ec7afe9..3e8426bcb 100644
--- a/sysutils/puppet-agent/pkg-descr
+++ b/sysutils/puppet-agent/pkg-descr
@@ -9,6 +9,16 @@ WWW: https://puppet.com/docs/puppet/latest/man/agent.html
Plugin Changelog
================
+1.1
+
+Added:
+* add new options runinterval and runtimeout
+* add new option usecacheonfailure
+
+Changed:
+* add default values for Puppet Server + Environment
+* don't wipe puppet.conf if service is disabled
+
1.0
Added:
diff --git a/sysutils/puppet-agent/src/opnsense/mvc/app/controllers/OPNsense/PuppetAgent/forms/general.xml b/sysutils/puppet-agent/src/opnsense/mvc/app/controllers/OPNsense/PuppetAgent/forms/general.xml
index 6713c5ec4..ce6b4412b 100644
--- a/sysutils/puppet-agent/src/opnsense/mvc/app/controllers/OPNsense/PuppetAgent/forms/general.xml
+++ b/sysutils/puppet-agent/src/opnsense/mvc/app/controllers/OPNsense/PuppetAgent/forms/general.xml
@@ -3,18 +3,36 @@
puppetagent.general.Enabledcheckbox
- Enable Puppet Agent
+ Enable the Puppet Agent service.puppetagent.general.FQDNtext
- Change Puppet Server FQDN
+ The primary Puppet Server to which the Puppet Agent should connect.puppetagent.general.Environmenttext
- Change Puppet Agent Environment
+ The environment in which Puppet is running.
+
+
+ puppetagent.general.RunInterval
+
+ text
+ How often Puppet Agent applies the catalog. Enter a number followed by one of the supported suffixes: "y" (years), "d" (days), "h" (hours), "m" (minutes), "s" (seconds).
+
+
+ puppetagent.general.RunTimeout
+
+ text
+ The maximum amount of time an agent run is allowed to take. Enter a number followed by one of the supported suffixes: "y" (years), "d" (days), "h" (hours), "m" (minutes), "s" (seconds).
+
+
+ puppetagent.general.UseCacheOnFailure
+
+ checkbox
+ Whether to use the cached configuration when the remote configuration will not compile.
diff --git a/sysutils/puppet-agent/src/opnsense/mvc/app/models/OPNsense/PuppetAgent/PuppetAgent.xml b/sysutils/puppet-agent/src/opnsense/mvc/app/models/OPNsense/PuppetAgent/PuppetAgent.xml
index f706d65a5..ffba1a25d 100644
--- a/sysutils/puppet-agent/src/opnsense/mvc/app/models/OPNsense/PuppetAgent/PuppetAgent.xml
+++ b/sysutils/puppet-agent/src/opnsense/mvc/app/models/OPNsense/PuppetAgent/PuppetAgent.xml
@@ -1,23 +1,39 @@
//OPNsense/puppetagent
- 1.0.0
+ 1.1.0Manage Puppet Agent service
-
-
0Y
+ puppetY
+ productionY/^.{1,100}$/uShould be a string between 1 and 100 characters.
+
+ 30m
+ /^([0-9]{1,8}(?:s|m|h|d|y)?)/u
+ Should be a number between 1 and 8 characters, optionally followed by either "y", "d", "h", "m" or "s".
+ Y
+
+
+ 1h
+ /^([0-9]{1,8}(?:s|m|h|d|y)?)/u
+ Should be a number between 1 and 8 characters, optionally followed by either "y", "d", "h", "m" or "s".
+ Y
+
+
+ 1
+ Y
+
diff --git a/sysutils/puppet-agent/src/opnsense/service/templates/OPNsense/PuppetAgent/puppetagent.conf b/sysutils/puppet-agent/src/opnsense/service/templates/OPNsense/PuppetAgent/puppetagent.conf
index c375941a9..dc3a3649d 100644
--- a/sysutils/puppet-agent/src/opnsense/service/templates/OPNsense/PuppetAgent/puppetagent.conf
+++ b/sysutils/puppet-agent/src/opnsense/service/templates/OPNsense/PuppetAgent/puppetagent.conf
@@ -1,10 +1,20 @@
-{% if helpers.exists('OPNsense.puppetagent.general') and OPNsense.puppetagent.general.Enabled|default("0") == "1" %}
[main]
-certname = {{ system.hostname|lower }}.{{ system.domain|lower }}
-server = {{ OPNsense.puppetagent.general.FQDN|default("") }}
-logdest = /var/log/puppet-agent.log
-{% if helpers.exists('OPNsense.puppetagent.general') and not helpers.empty('OPNsense.puppetagent.general.Environment') %}
+ certname = {{ system.hostname|lower }}.{{ system.domain|lower }}
+ logdest = /var/log/puppet-agent.log
+{% if OPNsense.puppetagent.general.RunInterval|default("") != "" %}
+ runinterval = {{ OPNsense.puppetagent.general.RunInterval }}
+{% endif %}
+{% if OPNsense.puppetagent.general.RunTimeout|default("") != "" %}
+ runtimeout = {{ OPNsense.puppetagent.general.RunTimeout}}
+{% endif %}
+ server = {{ OPNsense.puppetagent.general.FQDN|default("") }}
+{% if OPNsense.puppetagent.general.UseCacheOnFailure|default("0") == "1" %}
+ usecacheonfailure = true
+{% else %}
+ usecacheonfailure = false
+{% endif %}
+
[agent]
-environment = {{ OPNsense.puppetagent.general.Environment|default("") }}
-{% endif %}
+{% if not helpers.empty('OPNsense.puppetagent.general.Environment') %}
+ environment = {{ OPNsense.puppetagent.general.Environment|default("") }}
{% endif %}