comparison modules/firewall/manifests/params.pp @ 39:d6f2a0ee45c0 puppet-3.6

Add "Firewall" module
author IBBoard <dev@ibboard.co.uk>
date Sat, 14 Mar 2015 20:58:03 +0000
parents
children d9352a684e62
comparison
equal deleted inserted replaced
38:a1960fb961c5 39:d6f2a0ee45c0
1 class firewall::params {
2 case $::osfamily {
3 'RedHat': {
4 case $::operatingsystem {
5 'Amazon': {
6 $service_name = 'iptables'
7 $package_name = undef
8 }
9 'Fedora': {
10 if versioncmp($::operatingsystemrelease, '15') >= 0 {
11 $package_name = 'iptables-services'
12 } else {
13 $package_name = undef
14 }
15 $service_name = 'iptables'
16 }
17 default: {
18 if versioncmp($::operatingsystemrelease, '7.0') >= 0 {
19 $package_name = 'iptables-services'
20 } else {
21 $package_name = 'iptables-ipv6'
22 }
23 $service_name = 'iptables'
24 }
25 }
26 }
27 'Debian': {
28 case $::operatingsystem {
29 'Debian': {
30 if versioncmp($::operatingsystemrelease, '8.0') >= 0 {
31 $service_name = 'netfilter-persistent'
32 $package_name = 'iptables-persistent'
33 } else {
34 $service_name = 'iptables-persistent'
35 $package_name = 'iptables-persistent'
36 }
37
38 }
39 'Ubuntu': {
40 if versioncmp($::operatingsystemrelease, '14.10') >= 0 {
41 $service_name = 'netfilter-persistent'
42 $package_name = 'iptables-persistent'
43 } else {
44 $service_name = 'iptables-persistent'
45 $package_name = 'iptables-persistent'
46 }
47
48 }
49 default: {
50 $service_name = 'iptables-persistent'
51 $package_name = 'iptables-persistent'
52 }
53 }
54 }
55 'Gentoo': {
56 $service_name = ['iptables','ip6tables']
57 $package_name = 'net-firewall/iptables'
58 }
59 default: {
60 case $::operatingsystem {
61 'Archlinux': {
62 $service_name = ['iptables','ip6tables']
63 $package_name = undef
64 }
65 default: {
66 $service_name = 'iptables'
67 $package_name = undef
68 }
69 }
70 }
71 }
72 }