Make apt.conf.d/proxy world readable and add a newline
authorHenrik Ahlgren <pablo@seestieto.com>
Fri, 10 Jan 2014 15:09:18 +0000 (17:09 +0200)
committerHenrik Ahlgren <pablo@seestieto.com>
Tue, 25 Feb 2014 17:57:10 +0000 (19:57 +0200)
manifests/init.pp
spec/classes/apt_spec.rb

index 12db61a6df3b1c9080584436a02cc490e86e82a7..b0621fe1fb0efa2451141d5e53bf1c638fa79c7f 100644 (file)
@@ -128,8 +128,11 @@ Package: bogus-package\n",
   file { 'configure-apt-proxy':
     ensure  => $proxy_set,
     path    => "${apt_conf_d}/proxy",
-    content => "Acquire::http::Proxy \"http://${proxy_host}:${proxy_port}\";",
+    content => "Acquire::http::Proxy \"http://${proxy_host}:${proxy_port}\";\n",
     notify  => Exec['apt_update'],
+    mode    => '0644',
+    owner   => root,
+    group   => root,
   }
 
   # Need anchor to provide containment for dependencies.
index 0da7d32db03088751687508d60e594e4f2843619..7f88dddc3986cc2005357c2e8a1bc210020dfc29 100644 (file)
@@ -164,7 +164,7 @@ describe 'apt', :type => :class do
           if param_hash[:proxy_host]
             should contain_file('configure-apt-proxy').with(
               'path'    => '/etc/apt/apt.conf.d/proxy',
-              'content' => "Acquire::http::Proxy \"http://#{param_hash[:proxy_host]}:#{param_hash[:proxy_port]}\";",
+              'content' => "Acquire::http::Proxy \"http://#{param_hash[:proxy_host]}:#{param_hash[:proxy_port]}\";\n",
               'notify'  => "Exec[apt_update]"
             )
           else