Skip to content

Commit

Permalink
add missing documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sircubbi committed Sep 19, 2023
1 parent 4197b57 commit f88ced9
Show file tree
Hide file tree
Showing 13 changed files with 175 additions and 54 deletions.
114 changes: 60 additions & 54 deletions REFERENCE.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions lib/puppet/type/firewalld_custom_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
DOC

ensurable do
desc 'Manage the state of this type.'
defaultvalues
defaultto(:present)
end
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/type/firewalld_direct_chain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"

ensurable do
desc 'Manage the state of this type.'
defaultvalues
defaultto :present
end
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/type/firewalld_direct_passthrough.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"

ensurable do
desc 'Manage the state of this type.'
defaultvalues
defaultto :present
end
Expand Down
2 changes: 2 additions & 0 deletions lib/puppet/type/firewalld_direct_purge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"

ensurable do
desc 'Manage the state of this type.'
defaultto(:purged)
newvalue(:purgable)
newvalue(:purged) do
Expand All @@ -43,6 +44,7 @@ def generate
end

newparam(:purge) do
desc 'If unmaintained definitions should be purged'
newvalues(:true, :false)
defaultto(:true)
end
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/type/firewalld_direct_rule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"

ensurable do
desc 'Manage the state of this type.'
defaultvalues
defaultto :present
end
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/type/firewalld_ipset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def po2?(num)
end

ensurable do
desc 'Manage the state of this type.'
defaultvalues
defaultto :present
end
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/type/firewalld_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
DOC

ensurable do
desc 'Manage the state of this type.'
defaultvalues
defaultto :present
end
Expand Down
2 changes: 2 additions & 0 deletions lib/puppet/type/firewalld_port.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
"

ensurable do
desc 'Manage the state of this type.'

newvalue(:present) do
@resource.provider.create
end
Expand Down
2 changes: 2 additions & 0 deletions lib/puppet/type/firewalld_rich_rule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"

ensurable do
desc 'Manage the state of this type.'
defaultvalues
defaultto :present
end
Expand Down Expand Up @@ -121,6 +122,7 @@
end

newparam(:action) do
desc 'Specify the action fo this rule'
def _validate_action(value)
raise Puppet::Error, "Authorized action values are `accept`, `reject`, `drop` or `mark`, got #{value}" unless %w[accept drop reject mark].include? value
end
Expand Down
2 changes: 2 additions & 0 deletions lib/puppet/type/firewalld_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
DOC

ensurable do
desc 'Manage the state of this type.'

newvalue(:present) do
@resource.provider.create
end
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/type/firewalld_zone.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
DOC

ensurable do
desc 'Manage the state of this type.'
defaultvalues
defaultto :present
end
Expand Down
100 changes: 100 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,106 @@
# install_gui => true,
# }
#
# === Documentation
#
# @param package_ensure
# Define if firewalld-package should be handled
# Defaults to `installed` but can be set to `absent` or `latest`
#
# @param package
# The name of the `firewalld`-package
#
# @param service_enable
# If the `firewalld`-service should be enabled
#
# @param service_ensure
# The state that the `firewalld`-service should be in
#
# @param install_gui
# Set to true to install the `firewall-config`-package
#
# @param config_package
# The name of package that is installed if `install_gui` is true
#
# @param zones
# A hash of `firewalld_zone`-definitions
#
# @param policies
# A hash of `firewalld_policy`-definitions
#
# @param ports
# A hash of `firewalld_port`-definitions
#
# @param services
# A hash of `firewalld_service`-definitions
#
# @param rich_rules
# A hash of `firewalld_rich_rule`-definitions
#
# @param custom_services
# A hash of `firewalld_custom_service`-definitions
#
# @param ipsets
# A hash of `firewalld_ipset`-definitions
#
# @param direct_rules
# A hash of `firewalld_direct_rule`-definitions
#
# @param direct_chains
# A hash of `firewalld_direct_chain`-definitions
#
# @param direct_passthroughs
# A hash of `firewalld_direct_passthrough`-definitions
#
# @param purge_direct_rules
# If direct_rules not maintained by puppet should be removed
#
# @param purge_direct_chains
# If direct_chains not maintained by puppet should be removed
#
# @param purge_direct_passthroughs
# If direct_passthroughs not maintained by puppet should be removed
#
# @param purge_unknown_ipsets
# If ipsets not maintained by puppet should be removed
#
# @param default_zone
# Optional string to set the default zone
#
# @param log_denied
# Sets the mode for which denied packets should be logged
#
# @param cleanup_on_exit
# Controls the `CleanupOnExit` setting of `firewalld`
#
# @param zone_drifting
# Controls the `AllowZoneDrifting` setting of `firewalld`
# should be `no` because zone-drifting is deprecated
#
# @param minimal_mark
# Controls the `MinimalMark` setting of `firewalld`
#
# @param lockdown
# Controls the `Lockdown` setting of `firewalld`
#
# @param individual_calls
# Controls the `IndividualCalls` setting of `firewalld`
#
# @param ipv6_rpfilter
# Controls the `IPv6_rpfilter` setting of `firewalld`
#
# @param firewall_backend
# Chooses the backend between `iptables` (deprecated) or `nftables`
#
# @param default_service_zone
# Sets the default zone for `firewalld_service`
#
# @param default_port_zone
# Sets the default zone for `firewalld_port`
#
# @param default_port_protocol
# Sets the default protocol for `firewalld_port`
#
# === Authors
#
# Craig Dunn <[email protected]>
Expand Down

0 comments on commit f88ced9

Please sign in to comment.