First, make sure the module is in your modulepath
. To figure out what's configured as your modulepath
:
$ sudo puppet config print modulepath
/etc/puppet/modules:/usr/share/puppet/modules
So, in my case, there should be a /etc/puppet/modules/firewalld
directory.
Secondly, to define the node according to the example, the definition should look something like this:
node nodetest1 {
class {'firewalld::configuration':
default_zone => 'custom',
}
# define a zone
firewalld::zone { 'custom':
description => 'This is an example zone',
services => ['ssh', 'dhcpv6-client'],
ports => [{
port => '1234',
protocol => 'tcp',},],
masquerade => true,
forward_ports => [{
port => '123',
protocol => 'tcp',
to_port => '321',
to_addr => '1.2.3.4',},],
rich_rules => [{
family => 'ipv4',
source => {
address => '1.1.1.1',
invert => true,},
destination => {
address => '2.2.2.2/24',},
port => {
portid => '123-321',
protocol => 'udp',},
log => {
prefix => 'testing',
level => 'notice',
limit => '3/s',},
audit => {
limit => '2/h',},
action => {
action_type => 'reject',
reject_type => 'icmp-host-prohibited',
limit => '2/m',},
},],
}
}
If it does not apply, look in the puppetmaster's and nodetest
's logs(in RHEL-like distros, /var/log/messages
).