diff --git a/cookbooks/fb_network_scripts/README.md b/cookbooks/fb_network_scripts/README.md index fb78fa716..82dc2ae5e 100644 --- a/cookbooks/fb_network_scripts/README.md +++ b/cookbooks/fb_network_scripts/README.md @@ -53,6 +53,9 @@ Controls whether to manage packages for `network-scripts`; defaults to `true`. Controls pause frame settings of the primary interface. Keys correspond to parameters of `ethtool -a/-A`, values: `nil` (don't care), `true`, `false`. +#### `node['fb_network_scripts']['v6_default_gw']` +Sets IPV6_DEFAULTGW in /etc/sysconfig/network. Defaults to `nil` + ### Interface Configs This cookbook also provides interface configuration: diff --git a/cookbooks/fb_network_scripts/attributes/default.rb b/cookbooks/fb_network_scripts/attributes/default.rb index ab6a14b40..e1597ce73 100644 --- a/cookbooks/fb_network_scripts/attributes/default.rb +++ b/cookbooks/fb_network_scripts/attributes/default.rb @@ -60,6 +60,7 @@ 'enable_tun' => false, 'enable_bridge_filter' => false, 'linkdelay' => 0, + 'v6_default_gw' => nil, # Internal attributes, do not use '_rerun_ifup_local' => false, diff --git a/cookbooks/fb_network_scripts/templates/default/network.erb b/cookbooks/fb_network_scripts/templates/default/network.erb index 738296305..a863ac329 100644 --- a/cookbooks/fb_network_scripts/templates/default/network.erb +++ b/cookbooks/fb_network_scripts/templates/default/network.erb @@ -1,9 +1,11 @@ # This file is maintained by Chef. Do not edit, all changes will be # overwritten. See fb_network_scripts/README.md -# Note that we don't set GATEWAY in here because ifup-local will do it NETWORKING=yes HOSTNAME=<%= node['fqdn'] %> LINKDELAY=<%= node['fb_network_scripts']['linkdelay'] %> NETWORKING_IPV6=yes IFDOWN_ON_SHUTDOWN=no +<% if node['fb_network_scripts']['v6_default_gw'] %> +IPV6_DEFAULTGW="<%= node['fb_network_scripts']['v6_default_gw'] %>" +<% end %>