Skip to content

Commit

Permalink
support newer firewall module
Browse files Browse the repository at this point in the history
  • Loading branch information
saz committed May 19, 2024
1 parent 8173f65 commit 17e927c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
8 changes: 2 additions & 6 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
fixtures:
repositories:
firewall:
repo: 'https://github.com/puppetlabs/puppetlabs-firewall.git'
ref: 'v6.0.0'
firewall: 'https://github.com/puppetlabs/puppetlabs-firewall.git'
stdlib: 'https://github.com/puppetlabs/puppetlabs-stdlib.git'
svcprop: 'https://github.com/bolthole/puppet-svcprop.git'
selinux: 'https://github.com/voxpupuli/puppet-selinux.git'
systemd:
repo: 'https://github.com/camptocamp/puppet-systemd.git'
ref: '2.12.0'
systemd: 'https://github.com/camptocamp/puppet-systemd.git'
12 changes: 6 additions & 6 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,16 @@

if $facts['kernel'] == 'Linux' and $manage_firewall {
firewall { "100_tcp_${tcp_port}_for_memcached":
dport => $tcp_port,
proto => 'tcp',
action => 'accept',
dport => $tcp_port,
proto => 'tcp',
jump => 'accept',
}

if $udp_port != 0 {
firewall { "100_udp_${udp_port}_for_memcached":
dport => $udp_port,
proto => 'udp',
action => 'accept',
dport => $udp_port,
proto => 'udp',
jump => 'accept',
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions manifests/instance.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
$service_name = "memcached@${port}.service"
if $manage_firewall {
firewall { "100_tcp_${port}_for_memcached":
dport => $port,
proto => 'tcp',
action => 'accept',
dport => $port,
proto => 'tcp',
jump => 'accept',
}
}

Expand Down

0 comments on commit 17e927c

Please sign in to comment.