Puppet Class: tcpwrappers::config

Defined in:
manifests/config.pp

Overview

This class is called from tcpwrappers class to configure some basic pieces.



5
6
7
8
9
10
11
12
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
56
57
58
59
60
61
62
63
64
65
# File 'manifests/config.pp', line 5

class tcpwrappers::config {
  assert_private()
  concat { "${tcpwrappers::config_dir}/${tcpwrappers::file_allow}":
    ensure         => 'present',
    ensure_newline => true,
    owner          => 'root',
    group          => 'root',
    mode           => '0644',
    order          => 'alpha',
  }
  concat { "${tcpwrappers::config_dir}/${tcpwrappers::file_deny}":
    ensure         => 'present',
    ensure_newline => true,
    owner          => 'root',
    group          => 'root',
    mode           => '0644',
    order          => 'alpha',
  }
  if $tcpwrappers::allow_header {
    concat::fragment { 'tcpwrappers_allow_header':
      target => "${tcpwrappers::config_dir}/${tcpwrappers::file_allow}",
      order  => '0_header',
      source => "puppet:///modules/${tcpwrappers::allow_header_source}",
    }
  }
  if $tcpwrappers::allow_localhost_ipv4 {
    concat::fragment { 'tcpwrappers_allow_localhost_ipv4':
      target => "${tcpwrappers::config_dir}/${tcpwrappers::file_allow}",
      order  => '0_localhost_ipv4',
      source => 'puppet:///modules/tcpwrappers/allow_localhost_ipv4',
    }
  }
  if $tcpwrappers::allow_localhost_ipv6 {
    concat::fragment { 'tcpwrappers_allow_localhost_ipv6':
      target => "${tcpwrappers::config_dir}/${tcpwrappers::file_allow}",
      order  => '0_localhost_ipv6',
      source => 'puppet:///modules/tcpwrappers/allow_localhost_ipv6',
    }
  }
  if $tcpwrappers::allow_sshd_all {
    concat::fragment { 'tcpwrappers_allow_sshd_all':
      target => "${tcpwrappers::config_dir}/${tcpwrappers::file_allow}",
      order  => '0_sshd_all',
      source => 'puppet:///modules/tcpwrappers/allow_sshd_all',
    }
  }
  if $tcpwrappers::deny_header {
    concat::fragment { 'tcpwrappers_deny_header':
      target => "${tcpwrappers::config_dir}/${tcpwrappers::file_deny}",
      order  => '0_header',
      source => "puppet:///modules/${tcpwrappers::deny_header_source}",
    }
  }
  if $tcpwrappers::default_deny {
    concat::fragment { 'tcpwrappers_default_deny':
      target  => "${tcpwrappers::config_dir}/${tcpwrappers::file_deny}",
      order   => 'ZZ_deny_all',
      content => 'ALL : ALL',
    }
  }
}