]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
Update manifests/init.pp
authorScott Barber <scottwbarber@gmail.com>
Thu, 1 Nov 2012 20:08:28 +0000 (14:08 -0600)
committerKen Barber <ken@bob.sh>
Sun, 2 Jun 2013 17:51:27 +0000 (18:51 +0100)
If a proxy is set and then later unset we need to remove the proxy file. As it currently sits it'll just sit there hanging out.

manifests/init.pp

index b8e356c53ae8a3aa09b7427a96065189b1389158..21f36bd9ed7e8eb39057e6b3b2dfa838db5b1a75 100644 (file)
@@ -105,6 +105,12 @@ class apt(
       content => "Acquire::http::Proxy \"http://${proxy_host}:${proxy_port}\";",
       notify  => Exec['apt_update'],
     }
+  } else {
+    file { 'configure-apt-proxy':
+      path    => "${apt_conf_d}/proxy",
+      ensure  => absent
+      notify  => Exec['apt_update'],
+    }
   }
 
   # Need anchor to provide containment for dependencies.