Mercurial > repos > other > Puppet
annotate modules/firewall/manifests/linux/archlinux.pp @ 482:d83de9b3a62b default tip
Update hiera.yaml within Puppet config
Forgot that we manage it from here. Now has content to match
new packages
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Fri, 30 Aug 2024 16:10:36 +0100 |
parents | adf6fe9bbc17 |
children |
rev | line source |
---|---|
275
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
39
diff
changeset
|
1 # @summary |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
39
diff
changeset
|
2 # Manages `iptables` and `ip6tables` services, and creates files used for persistence, on Arch Linux systems. |
39 | 3 # |
275
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
39
diff
changeset
|
4 # @param ensure |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
39
diff
changeset
|
5 # Ensure parameter passed onto Service[] resources. Valid options: 'running' or 'stopped'. Defaults to 'running'. |
39 | 6 # |
275
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
39
diff
changeset
|
7 # @param enable |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
39
diff
changeset
|
8 # Enable parameter passed onto Service[] resources. Defaults to 'true'. |
39 | 9 # |
275
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
39
diff
changeset
|
10 # @param service_name |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
39
diff
changeset
|
11 # Specify the name of the IPv4 iptables service. Defaults defined in firewall::params. |
39 | 12 # |
275
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
39
diff
changeset
|
13 # @param package_name |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
39
diff
changeset
|
14 # Specify the platform-specific package(s) to install. Defaults defined in firewall::params. |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
39
diff
changeset
|
15 # |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
39
diff
changeset
|
16 # @param package_ensure |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
39
diff
changeset
|
17 # Controls the state of the iptables package on your system. Valid options: 'present' or 'latest'. Defaults to 'latest'. |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
39
diff
changeset
|
18 # |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
39
diff
changeset
|
19 # @api private |
39 | 20 # |
21 class firewall::linux::archlinux ( | |
478
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
398
diff
changeset
|
22 Enum[running, stopped, 'running', 'stopped'] $ensure = 'running', |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
398
diff
changeset
|
23 Variant[Boolean, String[1]] $enable = true, |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
398
diff
changeset
|
24 Variant[String[1], Array[String[1]]] $service_name = $firewall::params::service_name, |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
398
diff
changeset
|
25 Optional[Variant[String[1], Array[String[1]]]] $package_name = $firewall::params::package_name, |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
398
diff
changeset
|
26 Enum[present, latest, 'present', 'latest'] $package_ensure = $firewall::params::package_ensure, |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
398
diff
changeset
|
27 ) inherits firewall::params { |
39 | 28 if $package_name { |
29 package { $package_name: | |
275
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
39
diff
changeset
|
30 ensure => $package_ensure, |
39 | 31 } |
32 } | |
33 | |
34 service { $service_name: | |
35 ensure => $ensure, | |
36 enable => $enable, | |
37 hasstatus => true, | |
38 } | |
39 | |
40 file { '/etc/iptables/iptables.rules': | |
398
66c406eec60d
Update and fix firewall for Ubuntu
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
41 ensure => file, |
39 | 42 before => Service[$service_name], |
43 } | |
44 | |
45 file { '/etc/iptables/ip6tables.rules': | |
398
66c406eec60d
Update and fix firewall for Ubuntu
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
46 ensure => file, |
39 | 47 before => Service[$service_name], |
48 } | |
49 } |