diff --git a/manifests/init.pp b/manifests/init.pp index c4b090b2f3de57e86ab145f3312a35e3c2319553..f358c7b9bc9e4d5600ef872dd70182a9235d8d97 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -98,7 +98,12 @@ class network ( $gateway = undef, $nozeroconf = undef, $ipv6enable = undef, + $networking_ipv6 = undef, + $ipv6forwarding = undef, $ipv6_autoconf = undef, + $ipv6_autotunnel = undef, + $ipv6_defaultgw = undef, + $ipv6_radvd_pidfile = undef, # Stdmod commons $package_name = $::network::params::package_name, @@ -231,6 +236,28 @@ class network ( $config_file_ensure = present } + $manage_networking_ipv6 = $networking_ipv6 ? { + 'yes' => 'yes', + 'no' => 'no', + default => undef, + } + $manage_ipv6forwarding = $ipv6forwarding ? { + 'yes' => 'yes', + 'no' => 'no', + default => undef, + } + $manage_ipv6_autoconf = $ipv6_autoconf ? { + 'yes' => 'yes', + 'no' => 'no', + default => undef, + } + $manage_ipv6_autotunnel = $ipv6_autotunnel ? { + 'yes' => 'yes', + 'no' => 'no', + default => undef, + } + $manage_ipv6_defaultgw = $ipv6_defaultgw + $manage_ipv6_radvd_pidfile = $ipv6_radvd_pidfile # Dependency class diff --git a/templates/hostname-RedHat.erb b/templates/hostname-RedHat.erb index e484461a8a65fe5ae0b17d37d269e2b8f80bcd97..756a0853ec9dc3a8ab8dd4da2301e08f0c763028 100644 --- a/templates/hostname-RedHat.erb +++ b/templates/hostname-RedHat.erb @@ -9,9 +9,24 @@ NOZEROCONF="<%= @nozeroconf %>" <% if @ipv6enable -%> NETWORKING_IPV6="<%= @ipv6enable %>" IPV6INIT="<%= @ipv6enable %>" -<% if @ipv6_autoconf -%> -IPV6_AUTOCONF="<%= @ipv6_autoconf %>" <% end -%> +<% if @manage_networking_ipv6 -%> +NETWORKING_IPV6="<%= @manage_networking_ipv6 %>" +<% end -%> +<% if @manage_ipv6forwarding -%> +IPV6FORWARDING="<%= @manage_ipv6forwarding %>" +<% end -%> +<% if @manage_ipv6_autoconf -%> +IPV6_AUTOCONF="<%= @manage_ipv6_autoconf %>" +<% end -%> +<% if @manage_ipv6_autotunnel -%> +IPV6_AUTOTUNNEL="<%= @manage_ipv6_autotunnel %>" +<% end -%> +<% if @manage_ipv6_defaultgw -%> +IPV6_DEFAULTGW="<%= @manage_ipv6_defaultgw %>" +<% end -%> +<% if @manage_ipv6_radvd_pidfile -%> +IPV6_RADVD_PIDFILE="<%= @manage_ipv6_radvd_pidfile %>" <% end -%> <% if @hostname -%>HOSTNAME="<%= @hostname %>" <%- else %>HOSTNAME="<%= @manage_hostname.split('.').first %>"