Puppet Class: psick::hardening::network
- Defined in:
- manifests/hardening/network.pp
Overview
Generic class to manage network hardening.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'manifests/hardening/network.pp', line 13
class psick::hardening::network (
String $modprobe_template = '',
String $netconfig_template = '',
String $blacklist_template = '',
String $services_template = '',
Boolean $manage = $psick::manage,
Boolean $noop_manage = $psick::noop_manage,
Boolean $noop_value = $psick::noop_value,
) {
if $manage {
if $noop_manage {
noop($noop_value)
}
if $facts['os']['family'] == 'RedHat' {
if $modprobe_template != '' {
file { '/etc/modprobe.d/hardening.conf':
ensure => file,
content => template($modprobe_template),
}
}
if $blacklist_template != '' {
file { '/etc/modprobe.d/blacklist-nouveau.conf':
ensure => file,
content => template($blacklist_template),
}
}
if $netconfig_template != '' {
file { '/etc/netconfig':
ensure => file,
content => template($netconfig_template),
}
}
}
if $services_template != '' {
file { '/etc/services':
ensure => file,
content => template($services_template),
}
}
}
}
|