sysutils/puppet-agent: add usecacheonfailure

This commit is contained in:
Frank Wall
2023-01-18 00:13:39 +01:00
parent ed0e8f9487
commit 07c9c9fe87
4 changed files with 16 additions and 0 deletions
+1
View File
@@ -11,6 +11,7 @@ Plugin Changelog
Added:
* add new options runinterval and runtimeout
* add new option usecacheonfailure
Changed:
* add default values for Puppet Server + Environment
@@ -29,4 +29,10 @@
<type>text</type>
<help>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).</help>
</field>
<field>
<id>puppetagent.general.UseCacheOnFailure</id>
<label>Use Cache On Failure</label>
<type>checkbox</type>
<help>Whether to use the cached configuration when the remote configuration will not compile.</help>
</field>
</form>
@@ -30,6 +30,10 @@
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "y", "d", "h", "m" or "s".</ValidationMessage>
<Required>Y</Required>
</RunTimeout>
<UseCacheOnFailure type="BooleanField">
<default>1</default>
<Required>Y</Required>
</UseCacheOnFailure>
</general>
</items>
</model>
@@ -9,6 +9,11 @@ runinterval = {{ OPNsense.puppetagent.general.RunInterval }}
{% if OPNsense.puppetagent.general.RunTimeout|default("") != "" %}
runtimeout = {{ OPNsense.puppetagent.general.RunTimeout}}
{% endif %}
{% if OPNsense.puppetagent.general.UseCacheOnFailure|default("0") == "1" %}
usecacheonfailure = true
{% else %}
usecacheonfailure = false
{% endif %}
{% if helpers.exists('OPNsense.puppetagent.general') and not helpers.empty('OPNsense.puppetagent.general.Environment') %}
[agent]
environment = {{ OPNsense.puppetagent.general.Environment|default("") }}