mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
Merge pull request #3264 from fraenki/puppet_11
sysutils/puppet-agent: release version 1.1
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
+21
-3
@@ -3,18 +3,36 @@
|
||||
<id>puppetagent.general.Enabled</id>
|
||||
<label>Enabled</label>
|
||||
<type>checkbox</type>
|
||||
<help>Enable Puppet Agent</help>
|
||||
<help>Enable the Puppet Agent service.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>puppetagent.general.FQDN</id>
|
||||
<label>Puppet Server FQDN</label>
|
||||
<type>text</type>
|
||||
<help>Change Puppet Server FQDN</help>
|
||||
<help>The primary Puppet Server to which the Puppet Agent should connect.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>puppetagent.general.Environment</id>
|
||||
<label>Puppet Environment</label>
|
||||
<type>text</type>
|
||||
<help>Change Puppet Agent Environment</help>
|
||||
<help>The environment in which Puppet is running.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>puppetagent.general.RunInterval</id>
|
||||
<label>Run Interval</label>
|
||||
<type>text</type>
|
||||
<help>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).</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>puppetagent.general.RunTimeout</id>
|
||||
<label>Run Timeout</label>
|
||||
<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>
|
||||
|
||||
+19
-3
@@ -1,23 +1,39 @@
|
||||
<model>
|
||||
<mount>//OPNsense/puppetagent</mount>
|
||||
<version>1.0.0</version>
|
||||
<version>1.1.0</version>
|
||||
<description>Manage Puppet Agent service</description>
|
||||
<items>
|
||||
<!-- container -->
|
||||
<general>
|
||||
<!-- fields -->
|
||||
<Enabled type="BooleanField">
|
||||
<default>0</default>
|
||||
<Required>Y</Required>
|
||||
</Enabled>
|
||||
<FQDN type="HostnameField">
|
||||
<default>puppet</default>
|
||||
<Required>Y</Required>
|
||||
</FQDN>
|
||||
<Environment type="TextField">
|
||||
<default>production</default>
|
||||
<Required>Y</Required>
|
||||
<mask>/^.{1,100}$/u</mask>
|
||||
<ValidationMessage>Should be a string between 1 and 100 characters.</ValidationMessage>
|
||||
</Environment>
|
||||
<RunInterval type="TextField">
|
||||
<default>30m</default>
|
||||
<mask>/^([0-9]{1,8}(?:s|m|h|d|y)?)/u</mask>
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "y", "d", "h", "m" or "s".</ValidationMessage>
|
||||
<Required>Y</Required>
|
||||
</RunInterval>
|
||||
<RunTimeout type="TextField">
|
||||
<default>1h</default>
|
||||
<mask>/^([0-9]{1,8}(?:s|m|h|d|y)?)/u</mask>
|
||||
<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>
|
||||
|
||||
+17
-7
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user