Skip to content

Commit

Permalink
(#42) Add $simp_zone_masquerade parameter (#43)
Browse files Browse the repository at this point in the history
* (#42) Add $simp_zone_masquerade parameter

Forwards to the firewalld_zone 'masquerade' parameter.

* Bump version & CHANGELOG

---------

Co-authored-by: Sean Peterson <[email protected]>
Co-authored-by: Steven Pritchard <[email protected]>
Co-authored-by: op-ct <[email protected]>
  • Loading branch information
4 people authored Dec 4, 2023
1 parent 84f399a commit 9e0a731
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
* Thu Nov 30 2023 Sean Peterson <[email protected]> - 0.9.0
- Add $simp_zone_masquerade parameter

* Mon Oct 23 2023 Steven Pritchard <[email protected]> - 0.8.0
- [puppetsync] Add EL9 support

* Mon Oct 23 2023 Steven Pritchard <[email protected]> - 0.8.0
- [puppetsync] Add EL9 support

Expand Down
9 changes: 9 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ The following parameters are available in the `simp_firewalld` class:
* [`tidy_minutes`](#-simp_firewalld--tidy_minutes)
* [`simp_zone_interfaces`](#-simp_firewalld--simp_zone_interfaces)
* [`simp_zone_target`](#-simp_firewalld--simp_zone_target)
* [`simp_zone_masquerade`](#-simp_firewalld--simp_zone_masquerade)
* [`package_ensure`](#-simp_firewalld--package_ensure)

##### <a name="-simp_firewalld--rules"></a>`rules`
Expand Down Expand Up @@ -196,6 +197,14 @@ The default target for the 99_simp zone

Default value: `'DROP'`

##### <a name="-simp_firewalld--simp_zone_masquerade"></a>`simp_zone_masquerade`

Data type: `Boolean`

Whether to add or remove masquerading from the 99_simp zone

Default value: `false`

##### <a name="-simp_firewalld--package_ensure"></a>`package_ensure`

Data type: `String[1]`
Expand Down
5 changes: 5 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@
# @param simp_zone_target
# The default target for the 99_simp zone
#
# @param simp_zone_masquerade
# Whether to add or remove masquerading from the 99_simp zone
#
# @param package_ensure
# The 'ensure' value for package resources
class simp_firewalld (
Expand All @@ -98,6 +101,7 @@
Integer[1] $tidy_minutes = 10,
Array[Optional[String[1]]] $simp_zone_interfaces = [],
Enum['default', 'ACCEPT', 'REJECT', 'DROP'] $simp_zone_target = 'DROP',
Boolean $simp_zone_masquerade = false,
String[1] $package_ensure = simplib::lookup('simp_options::package_ensure', { 'default_value' => 'installed' }),
) {
if $enable {
Expand Down Expand Up @@ -136,6 +140,7 @@
purge_ports => true,
interfaces => $simp_zone_interfaces,
target => $simp_zone_target,
masquerade => $simp_zone_masquerade,
require => Service['firewalld'],
}

Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simp-simp_firewalld",
"version": "0.8.0",
"version": "0.9.0",
"author": "SIMP Team",
"summary": "SIMP-oriented firewalld management",
"license": "Apache-2.0",
Expand Down

0 comments on commit 9e0a731

Please sign in to comment.