summaryrefslogtreecommitdiff
path: root/global/overlay/etc/puppet/modules/sunet/manifests/ethernet_bonding.pp
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2015-03-22 17:11:23 +0100
committerLeif Johansson <leifj@sunet.se>2015-03-22 17:11:23 +0100
commit1709cf98ed0c2283c9f81f1f76302f7a539a62c3 (patch)
tree57e78f2d34a3b3c895debe3b4b16a57c57b2dfad /global/overlay/etc/puppet/modules/sunet/manifests/ethernet_bonding.pp
parent4d899d22b16dfe5412a0534da2a3f3b8ce95f491 (diff)
Diffstat (limited to 'global/overlay/etc/puppet/modules/sunet/manifests/ethernet_bonding.pp')
-rw-r--r--global/overlay/etc/puppet/modules/sunet/manifests/ethernet_bonding.pp19
1 files changed, 19 insertions, 0 deletions
diff --git a/global/overlay/etc/puppet/modules/sunet/manifests/ethernet_bonding.pp b/global/overlay/etc/puppet/modules/sunet/manifests/ethernet_bonding.pp
new file mode 100644
index 0000000..8ff7325
--- /dev/null
+++ b/global/overlay/etc/puppet/modules/sunet/manifests/ethernet_bonding.pp
@@ -0,0 +1,19 @@
+define sunet::ethernet_bonding() {
+ # Set up prerequisites for Ethernet LACP bonding of eth0 and eth1,
+ # for all physical hosts that are running Ubuntu.
+ #
+ # Bonding requires setup in /etc/network/interfaces as well.
+ #
+ if $::is_virtual == 'false' and $::operatingsystem == 'Ubuntu' {
+ if $::operatingsystemrelease <= '12.04' {
+ package {'ifenslave': ensure => 'present' }
+ } else {
+ package {'ifenslave-2.6': ensure => 'present' }
+ }
+
+ file_line { 'load_module_at_boot':
+ path => '/etc/modules',
+ line => 'bonding',
+ }
+ }
+}