root / manifests / rules / activemq.pp @ baad986e
Historique | Voir | Annoter | Télécharger (580 octets)
1 | 771b3256 | Nacho Barrientos | # @summary Provides input rules for Apache ActiveMQ |
---|---|---|---|
2 | # |
||
3 | # @param tcp |
||
4 | # Create the rule for TCP traffic. |
||
5 | # |
||
6 | # @param udp |
||
7 | # Create the rule for UDP traffic. |
||
8 | # |
||
9 | # @param port |
||
10 | # The port number for the ActiveMQ daemon. |
||
11 | class nftables::rules::activemq ( |
||
12 | Boolean $tcp = true, |
||
13 | Boolean $udp = true, |
||
14 | Stdlib::Port $port = 61616, |
||
15 | ) { |
||
16 | if $tcp { |
||
17 | nftables::rule { |
||
18 | 'default_in-activemq_tcp': |
||
19 | content => "tcp dport ${port} accept", |
||
20 | } |
||
21 | } |
||
22 | |||
23 | if $udp { |
||
24 | nftables::rule { |
||
25 | 'default_in-activemq_udp': |
||
26 | content => "udp dport ${port} accept", |
||
27 | } |
||
28 | } |
||
29 | } |