]> gitweb.fluxo.info Git - puppet-ferm.git/commitdiff
cleanup puppet-strings documentation
authorTim Meusel <tim@bastelfreak.de>
Thu, 9 Apr 2020 06:58:16 +0000 (08:58 +0200)
committerTim Meusel <tim@bastelfreak.de>
Thu, 9 Apr 2020 06:58:16 +0000 (08:58 +0200)
REFERENCE.md
manifests/chain.pp
manifests/config.pp
manifests/init.pp
manifests/install.pp
manifests/ipset.pp
manifests/service.pp

index 7e7d518beb05d8840ded88d3d01d91983b162a63..2de98f69608aee61d3acc6de1a0a1d2ea9fc84d5 100644 (file)
@@ -32,7 +32,7 @@ _Private Classes_
 
 ### ferm
 
-Class: ferm
+This class manages ferm installation and rule generation on modern linux systems
 
 #### Examples
 
@@ -240,7 +240,6 @@ Enable/Disable logging of packets to the kernel log, if no explicit chain matche
 Data type: `Optional[Ferm::Policies]`
 
 Set the default policy for CHAIN (works only for builtin chains)
-Default value: undef
 Allowed values: (ACCEPT|DROP) (see Ferm::Policies type)
 
 Default value: `undef`
@@ -250,7 +249,6 @@ Default value: `undef`
 Data type: `String[1]`
 
 Name of the chain that should be managed
-Default value: $name (resource name)
 Allowed values: String[1]
 
 Default value: $name
@@ -260,7 +258,6 @@ Default value: $name
 Data type: `Ferm::Tables`
 
 Select the target table (filter/raw/mangle/nat)
-Default value: 'filter'
 Allowed values: (filter|raw|mangle|nat) (see Ferm::Tables type)
 
 Default value: 'filter'
@@ -270,7 +267,6 @@ Default value: 'filter'
 Data type: `Array[Enum['ip','ip6']]`
 
 Set list of versions of ip we want ot use.
-Default value: $ferm::ip_versions
 
 Default value: $ferm::ip_versions
 
@@ -283,7 +279,7 @@ http://ferm.foo-projects.org/download/2.1/ferm.html#set
 
 #### Examples
 
-##### 
+##### Create an iptables rule that allows traffic that matches the ipset `internet`
 
 ```puppet
 ferm::ipset { 'CONSUL':
@@ -293,7 +289,7 @@ ferm::ipset { 'CONSUL':
 }
 ```
 
-##### create to matches for IPv6, both at the end of the `INPUT` chain. Explicitly mention the `filter` table.
+##### create two matches for IPv6, both at the end of the `INPUT` chain. Explicitly mention the `filter` table.
 
 ```puppet
 ferm::ipset { 'INPUT':
@@ -311,6 +307,12 @@ ferm::ipset { 'INPUT':
 
 The following parameters are available in the `ferm::ipset` defined type.
 
+##### `sets`
+
+Data type: `Hash[String[1], Ferm::Actions]`
+
+A hash with multiple sets. For each hash you can provide an action like `DROP` or `ACCEPT`.
+
 ##### `chain`
 
 Data type: `String[1]`
@@ -335,17 +337,11 @@ sadly, ip sets are version specific. You cannot mix IPv4 and IPv6 addresses. Bec
 
 Default value: 'ip'
 
-##### `sets`
-
-Data type: `Hash[String[1], Ferm::Actions]`
-
-A hash with multiple sets. For each hash you can provide an action like `DROP` or `ACCEPT`.
-
 ##### `prepend_to_chain`
 
 Data type: `Boolean`
 
-
+By default, ipset rules are added to the top of the chain. Set this to false to append them to the end instead.
 
 Default value: `true`
 
index 1be7e832ffacbcbfb2ec3c37043ae65bc2a6dc06..b66ef7f220bb090e7db4e12790b098b3e5c30094 100644 (file)
 # @param disable_conntrack Disable/Enable usage of conntrack
 # @param log_dropped_packets Enable/Disable logging of packets to the kernel log, if no explicit chain matched
 # @param policy Set the default policy for CHAIN (works only for builtin chains)
-#   Default value: undef
 #   Allowed values: (ACCEPT|DROP) (see Ferm::Policies type)
 # @param chain Name of the chain that should be managed
-#   Default value: $name (resource name)
 #   Allowed values: String[1]
 # @param table Select the target table (filter/raw/mangle/nat)
-#   Default value: 'filter'
 #   Allowed values: (filter|raw|mangle|nat) (see Ferm::Tables type)
 # @param ip_versions Set list of versions of ip we want ot use.
-#   Default value: $ferm::ip_versions
+#
 define ferm::chain (
   Boolean $disable_conntrack,
   Boolean $log_dropped_packets,
index 7dae7a5a9d7de7960db3fe696a5130ebd3421e4e..acc58d6f0520a1a40543a47dba7e9bdafb910b49 100644 (file)
@@ -1,5 +1,8 @@
+#
 # @api private
-# This class handles the configuration file. Avoid modifying private classes.
+#
+# @summary This class handles the configuration file. Avoid modifying private classes.
+#
 class ferm::config {
 
   # this is a private class
index cb3dd1bdc24fa75f97300c395755807bd751fbe6..ecaa391a4e1f6d1208871160c60dbc577db4ee18 100644 (file)
@@ -1,5 +1,3 @@
-# Class: ferm
-#
 # @summary This class manages ferm installation and rule generation on modern linux systems
 #
 # @example deploy ferm without any configured rules, but also don't start the service or modify existing config files
index 548846c7c7a490f2038fedcdc85e127cb092c5b2..4337a9947c32964e00a542aaae366690f346c880 100644 (file)
@@ -1,5 +1,8 @@
+#
 # @api private
-# This class handles the configuration file. Avoid modifying private classes.
+#
+# @summary This class handles the configuration file. Avoid modifying private classes.
+#
 class ferm::install {
 
   # this is a private class
index 1f859b80dac55f1a1b2e759fc1ef9b030baf84ea..23c555a8f43b72134f6f888a4a0315ae937622ec 100644 (file)
@@ -3,14 +3,14 @@
 #
 # @see http://ferm.foo-projects.org/download/2.1/ferm.html#set
 #
-# @example
+# @example Create an iptables rule that allows traffic that matches the ipset `internet`
 #   ferm::ipset { 'CONSUL':
 #     sets => {
 #       'internet' => 'ACCEPT'
 #     },
 #   }
 #
-# @example create to matches for IPv6, both at the end of the `INPUT` chain. Explicitly mention the `filter` table.
+# @example create two matches for IPv6, both at the end of the `INPUT` chain. Explicitly mention the `filter` table.
 #   ferm::ipset { 'INPUT':
 #     prepend_to_chain => false,
 #     table            => 'filter',
@@ -21,6 +21,8 @@
 #     },
 #   }
 #
+# @param sets
+#   A hash with multiple sets. For each hash you can provide an action like `DROP` or `ACCEPT`.
 # @param chain
 #   name of the chain we want to apply those rules to. The name of the defined resource will be used as default value for this.
 #
@@ -30,8 +32,8 @@
 # @param ip_version
 #   sadly, ip sets are version specific. You cannot mix IPv4 and IPv6 addresses. Because of this you need to provide the version.
 #
-# @param sets
-#   A hash with multiple sets. For each hash you can provide an action like `DROP` or `ACCEPT`.
+# @param prepend_to_chain
+#   By default, ipset rules are added to the top of the chain. Set this to false to append them to the end instead.
 #
 define ferm::ipset (
   Hash[String[1], Ferm::Actions] $sets,
index ad6fc47ef938de16f8633ec5bf20c1356845f814..9cc1373f8c2d2463976e76c680256e2f8e493017 100644 (file)
@@ -1,5 +1,8 @@
+#
 # @api private
-# This class handles the configuration file. Avoid modifying private classes.
+#
+# @summary This class handles the configuration file. Avoid modifying private classes.
+#
 class ferm::service {
 
   # this is a private class