Showing with 2,921 additions and 1,344 deletions.
  1. +2 −1 .editorconfig
  2. +11 −40 .github/CONTRIBUTING.md
  3. +0 −3 .github/SECURITY.md
  4. +18 −0 .github/workflows/ci.yml
  5. +21 −18 .gitignore
  6. +4 −1 .msync.yml
  7. +2 −1 .overcommit.yml
  8. +35 −19 .pmtignore
  9. +3 −0 .puppet-lint.rc
  10. +3 −0 .rspec
  11. +3 −0 .rspec_parallel
  12. +3 −0 .rubocop.yml
  13. +3 −16 .sync.yml
  14. +0 −49 .travis.yml
  15. +0 −2 .yardopts
  16. +39 −3 CHANGELOG.md
  17. +7 −8 Gemfile
  18. +223 −136 README.md
  19. +479 −399 REFERENCE.md
  20. +4 −32 Rakefile
  21. +2 −0 lib/facter/firewalld_version.rb
  22. +14 −10 lib/puppet/provider/firewalld.rb
  23. +23 −35 lib/puppet/provider/firewalld_custom_service/firewall_cmd.rb
  24. +2 −0 lib/puppet/provider/firewalld_direct_chain/firewall_cmd.rb
  25. +2 −0 lib/puppet/provider/firewalld_direct_passthrough/firewall_cmd.rb
  26. +6 −2 lib/puppet/provider/firewalld_direct_purge/firewall_cmd.rb
  27. +2 −0 lib/puppet/provider/firewalld_direct_rule/firewall_cmd.rb
  28. +5 −3 lib/puppet/provider/firewalld_ipset/firewall_cmd.rb
  29. +225 −0 lib/puppet/provider/firewalld_policy/firewall_cmd.rb
  30. +22 −3 lib/puppet/provider/firewalld_port/firewall_cmd.rb
  31. +38 −9 lib/puppet/provider/firewalld_rich_rule/firewall_cmd.rb
  32. +37 −3 lib/puppet/provider/firewalld_service/firewall_cmd.rb
  33. +85 −71 lib/puppet/provider/firewalld_zone/firewall_cmd.rb
  34. +9 −6 lib/puppet/type/firewalld_custom_service.rb
  35. +5 −2 lib/puppet/type/firewalld_direct_chain.rb
  36. +5 −2 lib/puppet/type/firewalld_direct_passthrough.rb
  37. +8 −8 lib/puppet/type/firewalld_direct_purge.rb
  38. +5 −2 lib/puppet/type/firewalld_direct_rule.rb
  39. +8 −7 lib/puppet/type/firewalld_ipset.rb
  40. +325 −0 lib/puppet/type/firewalld_policy.rb
  41. +28 −3 lib/puppet/type/firewalld_port.rb
  42. +52 −14 lib/puppet/type/firewalld_rich_rule.rb
  43. +30 −6 lib/puppet/type/firewalld_service.rb
  44. +56 −18 lib/puppet/type/firewalld_zone.rb
  45. +0 −69 manifests/custom_service.pp
  46. +146 −3 manifests/init.pp
  47. +23 −8 metadata.json
  48. +0 −7 rakelib/simp.rake
  49. +18 −19 spec/acceptance/{suites/default → }/00_default_spec.rb
  50. +0 −19 spec/acceptance/nodesets/default.yml
  51. +75 −31 spec/classes/init_spec.rb
  52. +2 −0 spec/classes/reload/complete_spec.rb
  53. +2 −0 spec/classes/reload_spec.rb
  54. +0 −144 spec/defines/custom_service_spec.rb
  55. +4 −2 spec/functions/safe_filename_spec.rb
  56. +10 −8 spec/spec_helper.rb
  57. +6 −30 spec/spec_helper_acceptance.rb
  58. +3 −1 spec/unit/facter/firewalld_version_spec.rb
  59. +4 −2 spec/unit/puppet/provider/firewalld_custom_service_spec.rb
  60. +7 −0 spec/unit/puppet/provider/firewalld_ipset_spec.rb
  61. +79 −0 spec/unit/puppet/provider/firewalld_policy_spec.rb
  62. +27 −1 spec/unit/puppet/provider/firewalld_rich_rule_spec.rb
  63. +7 −1 spec/unit/puppet/provider/firewalld_zone_spec.rb
  64. +10 −8 spec/unit/puppet/type/firewalld_custom_service_spec.rb
  65. +7 −3 spec/unit/puppet/type/firewalld_direct_chain_spec.rb
  66. +5 −2 spec/unit/puppet/type/firewalld_direct_passthrough_spec.rb
  67. +30 −2 spec/unit/puppet/type/firewalld_direct_rule_spec.rb
  68. +22 −13 spec/unit/puppet/type/firewalld_ipset_spec.rb
  69. +264 −0 spec/unit/puppet/type/firewalld_policy_spec.rb
  70. +5 −3 spec/unit/puppet/type/firewalld_port_spec.rb
  71. +90 −22 spec/unit/puppet/type/firewalld_rich_rule_spec.rb
  72. +5 −3 spec/unit/puppet/type/firewalld_service_spec.rb
  73. +216 −11 spec/unit/puppet/type/firewalld_zone_spec.rb
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# editorconfig.org

# MANAGED BY MODULESYNC
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

root = true

Expand Down
51 changes: 11 additions & 40 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ By participating in this project you agree to abide by its terms.

* Fork the repo.
* Create a separate branch for your change.
* We only take pull requests with passing tests, and documentation. [travis-ci](http://travis-ci.org) runs the tests for us. You can also execute them locally. This is explained [in a later section](#the-test-matrix).
* We only take pull requests with passing tests, and documentation. [GitHub Actions](https://docs.github.com/en/actions) run the tests for us. You can also execute them locally. This is explained [in a later section](#the-test-matrix).
* Checkout [our docs](https://voxpupuli.org/docs/reviewing_pr/) we use to review a module and the [official styleguide](https://puppet.com/docs/puppet/6.0/style_guide.html). They provide some guidance for new code that might help you before you submit a pull request.
* Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, please add a test.
* Squash your commits down into logical components. Make sure to rebase against our current master.
Expand Down Expand Up @@ -124,7 +124,7 @@ If you have Ruby 2.x or want a specific version of Puppet,
you must set an environment variable such as:

```sh
export PUPPET_VERSION="~> 5.5.6"
export PUPPET_GEM_VERSION="~> 6.1.0"
```

You can install all needed gems for spec tests into the modules directory by
Expand Down Expand Up @@ -232,52 +232,23 @@ simple tests against it after applying the module. You can run this
with:

```sh
bundle exec rake acceptance
BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker
```

This will run the tests on the module's default nodeset. You can override the
nodeset used, e.g.,

```sh
BEAKER_set=centos-7-x64 bundle exec rake acceptance
```

There are default rake tasks for the various acceptance test modules, e.g.,

```sh
bundle exec rake beaker:centos-7-x64
bundle exec rake beaker:ssh:centos-7-x64
```

If you don't want to have to recreate the virtual machine every time you can
use `BEAKER_destroy=no` and `BEAKER_provision=no`. On the first run you will at
least need `BEAKER_provision` set to yes (the default). The Vagrantfile for the
created virtual machines will be in `.vagrant/beaker_vagrant_files`.

Beaker also supports docker containers. We also use that in our automated CI
pipeline at [travis-ci](http://travis-ci.org). To use that instead of Vagrant:

```sh
PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian10-64{hypervisor=docker} BEAKER_destroy=yes bundle exec rake beaker
```

You can replace the string `debian10` with any common operating system.
You can replace the string `debian11` with any common operating system.
The following strings are known to work:

* ubuntu1604
* ubuntu1804
* ubuntu2004
* debian9
* debian10
* centos6
* ubuntu2204
* debian11
* centos7
* centos8
* centos9
* almalinux8
* almalinux9
* fedora36

The easiest way to debug in a docker container is to open a shell:

```sh
docker exec -it -u root ${container_id_or_name} bash
```
For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests).

The source of this file is in our [modulesync_config](https://github.com/voxpupuli/modulesync_config/blob/master/moduleroot/.github/CONTRIBUTING.md.erb)
repository.
3 changes: 0 additions & 3 deletions .github/SECURITY.md

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

name: CI

on: pull_request

concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: true

jobs:
puppet:
name: Puppet
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v1
with:
pidfile_workaround: 'false'
39 changes: 21 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
pkg/
Gemfile.lock
Gemfile.local
vendor/
.vendor/
spec/fixtures/manifests/
spec/fixtures/modules/
.vagrant/
.bundle/
.ruby-version
coverage/
log/
.idea/
.dependencies/
.librarian/
Puppetfile.lock
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

/pkg/
/Gemfile.lock
/Gemfile.local
/vendor/
/.vendor/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/.vagrant/
/.bundle/
/.ruby-version
/coverage/
/log/
/.idea/
/.dependencies/
/.librarian/
/Puppetfile.lock
*.iml
.*.sw?
.yardoc/
Guardfile
/.yardoc/
/Guardfile
5 changes: 4 additions & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
---
modulesync_config_version: '3.1.0'
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '7.0.0'
3 changes: 2 additions & 1 deletion .overcommit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Managed by https://github.com/voxpupuli/modulesync_configs
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
#
# Hooks are only enabled if you take action.
#
Expand Down
54 changes: 35 additions & 19 deletions .pmtignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,37 @@
docs/
pkg/
Gemfile.lock
Gemfile.local
vendor/
.vendor/
spec/fixtures/manifests/
spec/fixtures/modules/
.vagrant/
.bundle/
.ruby-version
coverage/
log/
.idea/
.dependencies/
.librarian/
Puppetfile.lock
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

/docs/
/pkg/
/Gemfile
/Gemfile.lock
/Gemfile.local
/vendor/
/.vendor/
/spec/
/Rakefile
/.vagrant/
/.bundle/
/.ruby-version
/coverage/
/log/
/.idea/
/.dependencies/
/.github/
/.librarian/
/Puppetfile.lock
*.iml
/.editorconfig
/.fixtures.yml
/.gitignore
/.msync.yml
/.overcommit.yml
/.pmtignore
/.rspec
/.rspec_parallel
/.rubocop.yml
/.sync.yml
.*.sw?
.yardoc/
Dockerfile
/.yardoc/
/.yardopts
/Dockerfile
3 changes: 3 additions & 0 deletions .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--fail-on-warnings
--no-parameter_documentation-check
--no-parameter_types-check
3 changes: 3 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

--format documentation
--color
3 changes: 3 additions & 0 deletions .rspec_parallel
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

--format progress
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

inherit_gem:
voxpupuli-test: rubocop.yml
19 changes: 3 additions & 16 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,15 @@
secure: "S+FbvY0fDhzg5uPJZm/mkJCGTUuA2ps2Yay9pPrkjTuCqYcbhjm/NOhXPRWJDONo/3Zo7vQZey9PKcsdK3hznwlfkvB1Ghb/829655lZ2lwHZCoZfGURV/FB+ztjyVT2B/xOwisjz8OGQ8AECOX7l6SjUHzLZWZxpSUWYKTLOAyD+b08jR9eiQBshxjmhxzXl+shHXXRVnGo9TEjPMLXqKpwirNucKjHYdWcYcD+Z1Yfacu3O6Ry4PqCZ0VfRf+ahIbUcnriEke1IF6NU0VquyyaSw1nYrTAUW3bHeRTyAU3Uruh2O+lXRkt8UuxDhFs17JLbrb+0a8odr0mg6kdVowEuPYJSCMEUciyoi6ztHJiVceXK2rge5Yi0jw120wRK/cWxDImc8hUh9atGgE5VzMIzu3DJOcpslVSc+iffCPg3/EVol/Ekg9WVb4s1Vj7XFwjczXVaG7mJVF5HSg0JrP+xz1rTvVLvNaNVtZDvEYphscBBUt8ujqqmz4oICWSNa7wo1JLEd1qBwPk+tgmGr1EB3wvcU12KjKotswSjkG2uqNwKO7b9ETUMOzaIxo5dLOr5pUrV9LCDIBAzkeD8HqX6pNHJE1qhZJxLUWOVaDrQNBbJp6yY5xmkg5oNwykPAGKJXAuzTYlBjYBs7ss9RO/Wpn73ExnHEI9DX43rfo="
spec/spec_helper.rb:
mock_with: ':mocha'
spec/acceptance/nodesets/ec2/amazonlinux-2016091.yml:
delete: true
spec/acceptance/nodesets/ec2/image_templates.yaml:
delete: true
spec/acceptance/nodesets/ec2/rhel-73-x64.yml:
delete: true
spec/acceptance/nodesets/ec2/sles-12sp2-x64.yml:
delete: true
spec/acceptance/nodesets/ec2/ubuntu-1604-x64.yml:
delete: true
spec/acceptance/nodesets/ec2/windows-2016-base-x64.yml:
delete: true
spec/acceptance/nodesets/archlinux-2-x64.yml:
delete: true

spec/spec_helper_acceptance.rb:
unmanaged: false

Gemfile:
optional:
':test':
- gem: 'mocha'
version: '~> 1.10.0'
':system_tests':
- gem: 'simp-beaker-helpers'

.rubocop.yml:
default_configs:
Expand Down
49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .yardopts

This file was deleted.

42 changes: 39 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,49 @@ All notable changes to this project will be documented in this file.
Each new release typically also includes the latest modulesync defaults.
These should not affect the functionality of the module.

## [v4.5.1](https://github.com/voxpupuli/puppet-firewalld/tree/v4.5.1) (2022-08-15)
## [v5.0.0](https://github.com/voxpupuli/puppet-firewalld/tree/v5.0.0) (2023-11-03)

[Full Changelog](https://github.com/voxpupuli/puppet-firewalld/compare/v4.5.0...v4.5.1)
[Full Changelog](https://github.com/voxpupuli/puppet-firewalld/compare/v4.5.1...v5.0.0)

**Breaking changes:**

- modulesync 7.0.0 and modernization [\#347](https://github.com/voxpupuli/puppet-firewalld/pull/347) ([jcpunk](https://github.com/jcpunk))
- Drop Puppet 6 support [\#339](https://github.com/voxpupuli/puppet-firewalld/pull/339) ([bastelfreak](https://github.com/bastelfreak))
- Add support for icmp-block-inversion [\#330](https://github.com/voxpupuli/puppet-firewalld/pull/330) ([jcpunk](https://github.com/jcpunk))

**Implemented enhancements:**

- Support ICMP block inversion in zones [\#270](https://github.com/voxpupuli/puppet-firewalld/issues/270)
- Add the parameter protocols to the firewalld\_zone resource type [\#357](https://github.com/voxpupuli/puppet-firewalld/pull/357) ([jcpunk](https://github.com/jcpunk))
- add missing documentation [\#353](https://github.com/voxpupuli/puppet-firewalld/pull/353) ([sircubbi](https://github.com/sircubbi))
- Run rubocop linter [\#350](https://github.com/voxpupuli/puppet-firewalld/pull/350) ([jcpunk](https://github.com/jcpunk))
- Add Puppet 8 support [\#343](https://github.com/voxpupuli/puppet-firewalld/pull/343) ([bastelfreak](https://github.com/bastelfreak))
- puppetlabs/stdlib: Allow 9.x [\#342](https://github.com/voxpupuli/puppet-firewalld/pull/342) ([bastelfreak](https://github.com/bastelfreak))
- Add individual\_calls parameter to set IndividualCalls [\#337](https://github.com/voxpupuli/puppet-firewalld/pull/337) ([Griphon](https://github.com/Griphon))
- Add support SLES 15 [\#334](https://github.com/voxpupuli/puppet-firewalld/pull/334) ([marek130](https://github.com/marek130))
- Add methods instances and prefetch for firewalld\_service [\#332](https://github.com/voxpupuli/puppet-firewalld/pull/332) ([marek130](https://github.com/marek130))
- Add support for policy objects [\#324](https://github.com/voxpupuli/puppet-firewalld/pull/324) ([qha](https://github.com/qha))
- Set default\_zone and log\_denied when firewalld is offline [\#317](https://github.com/voxpupuli/puppet-firewalld/pull/317) ([jameslikeslinux](https://github.com/jameslikeslinux))
- enable eb-family for all relevant firewalld-types [\#299](https://github.com/voxpupuli/puppet-firewalld/pull/299) ([sircubbi](https://github.com/sircubbi))
- Support specifying priority on rich rules [\#296](https://github.com/voxpupuli/puppet-firewalld/pull/296) ([ananace](https://github.com/ananace))

**Fixed bugs:**

- Simple version bump to fix internal release issues
- Try to fixup failing ICMP tests [\#356](https://github.com/voxpupuli/puppet-firewalld/pull/356) ([jcpunk](https://github.com/jcpunk))
- Fixup ICMP tests and set defaults [\#352](https://github.com/voxpupuli/puppet-firewalld/pull/352) ([jcpunk](https://github.com/jcpunk))
- Fix rich rule with typed action [\#329](https://github.com/voxpupuli/puppet-firewalld/pull/329) ([bmagistro](https://github.com/bmagistro))

**Closed issues:**

- \[4.5.1\] detect and filter overlapped IP's on firewalld\_ipset [\#355](https://github.com/voxpupuli/puppet-firewalld/issues/355)
- Upgrade compatibility to \<8.0.0? [\#333](https://github.com/voxpupuli/puppet-firewalld/issues/333)
- support for policy objects missing [\#316](https://github.com/voxpupuli/puppet-firewalld/issues/316)
- missing support for bridges/eb-familiy [\#298](https://github.com/voxpupuli/puppet-firewalld/issues/298)
- Cannot create rich rule with reject type [\#193](https://github.com/voxpupuli/puppet-firewalld/issues/193)

## [v4.5.1](https://github.com/voxpupuli/puppet-firewalld/tree/v4.5.1) (2022-08-15)

[Full Changelog](https://github.com/voxpupuli/puppet-firewalld/compare/v4.5.0...v4.5.1)

## [v4.5.0](https://github.com/voxpupuli/puppet-firewalld/tree/v4.5.0) (2022-08-15)

Expand Down
Loading