Make cloud-init deal with resolv.conf 03/27303/1
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Tue, 22 Sep 2015 16:44:17 +0000 (09:44 -0700)
committerAndrew Grimberg <agrimberg@linuxfoundation.org>
Tue, 22 Sep 2015 16:44:17 +0000 (09:44 -0700)
This should make Ubuntu based systems handle forcing resolv.conf for us
in a proper fashion. We may still need to do some work for Fedora based
images.

Change-Id: I354c8905d8958dd05ca977a9d82c37c47baa2ded
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
vagrant/lib/lf-networking/confignetwork.pp

index b6cdd8aacb783fd9c027603c8e2258366b5e645a..ef4ff82242ec43326409eb4a0c220df8af3c2780 100644 (file)
@@ -91,7 +91,10 @@ resolv_conf:
 }
 
 file_line { 'add_resolver':
-  path  => '/etc/cloud/cloud.cfg.d/10_rackspace.cfg',
+  path       => $::operatingsystem ? {
+    'Ubuntu' => '/etc/cloud/cloud.cfg',
+    default  => '/etc/cloud/cloud.cfg.d/10_rackspace.cfg',
+  },
   line  => ' - resolv_conf',
   after => ' - update_etc_hosts',
 }