aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/sysctl/disable_ipv6.pp
blob: 2c384c3877ddd757b4e0d3140edbd94c8b80dd99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Do not enable ipv6 by default
# See https://wiki.debian.org/DebianIPv6
class nodo::subsystem::sysctl::disable_ipv6(
  $ensure = lookup('nodo::sysctl::disable_ipv6', undef, undef, 'present'),
) {
  file { "/etc/sysctl.d/disable_ipv6.conf":
    owner   => "root",
    group   => "root",
    mode    => '0644',
    ensure  => $ensure,
    source  => "puppet:///modules/nodo/etc/sysctl.d/disable_ipv6.conf",
  }

  exec { "sysctl-disable-ipv6":
    command     => '/sbin/sysctl -p',
    subscribe   => File["/etc/sysctl.d/disable_ipv6.conf"],
    refreshonly => true,
  }
}