summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Thulin <fredrik@thulin.net>2014-05-27 10:39:29 +0200
committerFredrik Thulin <fredrik@thulin.net>2014-05-27 10:39:29 +0200
commitef688068c066386bf366c1d7c14a820adf5bf307 (patch)
treef58daa2aa0b27dc86731406fd1bb8ca622b7b1be
parent8adb5e0bc15799d813d1aeed1296c1b036fba570 (diff)
Figure out best interface to use for DHCP.sunet-ops-2014-05-27-v05
-rw-r--r--global/overlay/etc/puppet/manifests/cosmos-site.pp8
1 files changed, 7 insertions, 1 deletions
diff --git a/global/overlay/etc/puppet/manifests/cosmos-site.pp b/global/overlay/etc/puppet/manifests/cosmos-site.pp
index e8d2615..8e23e76 100644
--- a/global/overlay/etc/puppet/manifests/cosmos-site.pp
+++ b/global/overlay/etc/puppet/manifests/cosmos-site.pp
@@ -491,11 +491,17 @@ node 'cdr1.sunet.se' {
class sunet-cdr {
+ # Listen on br0 if it exists (cdr1), otherwise bond0 (cdr2).
+ $interface = $::ipaddress_br0 ? {
+ undef => 'bond0',
+ default => 'br0',
+ }
+
class { 'dhcp':
dnsdomain => [ 'eduid.se','sunet.se','swamid.se' ],
nameservers => ['130.242.80.14','130.242.80.99'],
ntpservers => ['ntp1.nordu.net','ntp2.nordu.net','Time1.Stupi.SE'],
- interfaces => ['bond0'],
+ interfaces => [$interface],
#pxeserver => '130.242.125.5',
#pxefilename => 'pxelinux.0'
}