This commit is contained in:
Frank Wall 2026-05-25 09:40:55 +08:00 committed by GitHub
commit b2f74efa85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 33 additions and 20 deletions

View file

@ -1,7 +1,7 @@
PLUGIN_NAME= puppet-agent
PLUGIN_VERSION= 1.2
PLUGIN_COMMENT= Manage Puppet Agent
PLUGIN_DEPENDS= puppet8 py${PLUGIN_PYTHON}-opn-cli
PLUGIN_VERSION= 2.0
PLUGIN_COMMENT= Manage Puppet/OpenVox Agent
PLUGIN_DEPENDS= openvox-agent8 rubygem-opn_api
PLUGIN_MAINTAINER= jan.wink93@gmail.com
.include "../../Mk/plugins.mk"

View file

@ -9,6 +9,13 @@ WWW: https://puppet.com/docs/puppet/latest/man/agent.html
Plugin Changelog
================
2.0
Changed:
* switch to OpenVox Agent
* replace opn-cli with opn_api
* modernize UI template
1.2
Changed:

View file

@ -1,6 +1,6 @@
{#
OPNsense® is Copyright © 2021 Frank Wall
OPNsense® is Copyright © 2021-2026 Frank Wall
OPNsense® is Copyright © 2021 Jan Winkler
OPNsense® is Copyright © 2014 2015 by Deciso B.V.
All rights reserved.
@ -29,28 +29,35 @@ POSSIBILITY OF SUCH DAMAGE.
#}
<script>
$( document ).ready(function() {
var data_get_map = {'frm_GeneralSettings':"/api/puppetagent/settings/get"};
mapDataToFormUI(data_get_map).done(function(data){
// place actions to run after load, for example update form styles.
$(document).ready(function() {
mapDataToFormUI({'frm_GeneralSettings': "/api/puppetagent/settings/get"}).done(function() {
formatTokenizersUI();
$('.selectpicker').selectpicker('refresh');
updateServiceControlUI('puppetagent');
});
// link save button to API set action
$("#saveAct").SimpleActionButton({
onPreAction: function() {
const dfObj = new $.Deferred();
saveFormToEndpoint(url="/api/puppetagent/settings/set",formid='frm_GeneralSettings', function() {
dfObj.resolve();
});
return dfObj;
saveFormToEndpoint(
"/api/puppetagent/settings/set",
'frm_GeneralSettings',
function() {
dfObj.resolve();
},
true,
function() {
dfObj.reject();
}
);
return dfObj.promise();
}
});
updateServiceControlUI('puppetagent');
});
</script>
<ul class="nav nav-tabs" role="tablist" id="maintabs">
<li class="active"><a data-toggle="tab" id="settings-introduction" href="#subtab_settings-introduction"><b>{{ lang._('Introduction') }}</b></a></li>
<li><a data-toggle="tab" id="settings-tab" href="#settings"><b>{{ lang._('Settings') }}</b></a></li>
<li class="active"><a data-toggle="tab" id="settings-introduction" href="#subtab_settings-introduction">{{ lang._('Introduction') }}</a></li>
<li><a data-toggle="tab" id="settings-tab" href="#settings">{{ lang._('Settings') }}</a></li>
</ul>
<div class="content-box tab-content">
@ -58,11 +65,11 @@ POSSIBILITY OF SUCH DAMAGE.
<div id="subtab_settings-introduction" class="tab-pane fade in active">
<div class="col-md-12">
<h1>{{ lang._('Quick Start Guide') }}</h1>
<p>{{ lang._("Welcome to the Puppet Agent plugin! This plugin allows you to integrate OPNsense with your Puppet environment.") }}</p>
<p>{{ lang._("Welcome to the Puppet Agent plugin! This plugin allows you to integrate OPNsense with your Puppet/OpenVox environment.") }}</p>
<p>{{ lang._("Keep in mind that you should not treat OPNsense like any other operating system. Most notably you should not modify system files or packages. Instead use the OPNsense API to make configuration changes and to manage plugins. The following tools are a good starting point when trying to automate OPNsense with Puppet:") }}</p>
<ul>
<li>{{ lang._("%sopn-cli:%s A command line client to configure OPNsense core and plugin components through their respective APIs.") | format('<a href="https://github.com/andreas-stuerz/opn-cli" target="_blank">', '</a>') }}</li>
<li>{{ lang._("%spuppet/opnsense:%s A read-to-use Puppet module for automating the OPNsense firewall.") | format('<a href="https://github.com/andreas-stuerz/puppet-opnsense" target="_blank">', '</a>') }}</li>
<li>{{ lang._("%sopn_api:%s A command line client to configure OPNsense core and plugin components through their respective APIs.") | format('<a href="https://github.com/markt-de/opn-api" target="_blank">', '</a>') }}</li>
<li>{{ lang._("%spuppet/opn:%s A read-to-use Puppet module for automating the OPNsense firewall.") | format('<a href="https://github.com/markt-de/puppet-opn" target="_blank">', '</a>') }}</li>
</ul>
<p>{{ lang._("Note that these tools are not directly related to this plugin. Please report issues and missing features directly to the author.") }}</p>
</div>
@ -80,7 +87,6 @@ POSSIBILITY OF SUCH DAMAGE.
data-error-title="{{ lang._('Error reconfiguring puppetagent') }}"
type="button">
</button>
<br/>
</div>
</div>