Skip to content

Commit

Permalink
make module firewall < 9.0.0 compatible (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
saz authored May 20, 2024
1 parent 8173f65 commit 4071e5b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
4 changes: 1 addition & 3 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
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'
Expand Down
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 4071e5b

Please sign in to comment.