aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/hosts.pp
blob: 54d112b79dcc0e8afdebbea99aca7e96b86c4306 (plain)
1
2
3
4
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
class nodo::subsystem::hosts(
  $custom = lookup('nodo::subsystem::hosts::custom', undef, undef, false)
) {
  # Sometimes might be useful to manage the whole
  # hosts file, see http://projects.puppetlabs.com/issues/10704
  case $custom {
    true: {
      file { '/etc/hosts':
        ensure => present,
        owner  => root,
        group  => root,
        mode   => '0640',
        source => "puppet:///modules/site_nodo/hosts/${::fqdn}",
      }
    }
    #default: {
    #  host { "${::hostname}":
    #    ensure       => present,
    #    ip           => "${::ipaddress}",
    #    host_aliases => [ "${::fqdn}" ],
    #  }
    #
    #  #host { "localhost":
    #  #  ensure => present,
    #  #  ip     => "127.0.0.1",
    #  #}
    #
    #  #host { "ip6-localhost":
    #  #  ensure       => present,
    #  #  ip           => "::1",
    #  #  host_aliases => [ "ip6-loopback" ],
    #  #}
    #
    #  #host { "ip6-localnet":
    #  #  ensure => present,
    #  #  ip     => "fe00::0",
    #  #}
    #
    #  #host { "ip6-mcastprefix":
    #  #  ensure => present,
    #  #  ip     => "ff00::0",
    #  #}
    #
    #  #host { "ip6-allnodes":
    #  #  ensure => present,
    #  #  ip     => "ff02::1",
    #  #}
    #
    #  #host { "ip6-allrouters":
    #  #  ensure => present,
    #  #  ip     => "ff02::2",
    #  #}
    #
    #  #host { "ip6-allhosts":
    #  #  ensure => present,
    #  #  ip     => "ff02::3",
    #  #}
    #}
  }
}