Manage apt proxy configuration
authorJan Dittberner <jandd@cacert.org>
Sat, 26 Aug 2017 16:03:33 +0000 (18:03 +0200)
committerJan Dittberner <jandd@cacert.org>
Sat, 26 Aug 2017 16:03:33 +0000 (18:03 +0200)
sitemodules/profiles/files/base/apt_proxy.conf [new file with mode: 0644]
sitemodules/profiles/manifests/base.pp

diff --git a/sitemodules/profiles/files/base/apt_proxy.conf b/sitemodules/profiles/files/base/apt_proxy.conf
new file mode 100644 (file)
index 0000000..5dab694
--- /dev/null
@@ -0,0 +1,3 @@
+Acquire::http { Proxy "http://10.0.0.201:3128"; };
+Acquire::PDiffs False;
+Acquire::Languages "none";
index f29a393..86daddb 100644 (file)
@@ -54,14 +54,14 @@ class profiles::base (
       managehome     => true,
     }
     $user['ssh_keys'].each |Hash[String, Data] $keydata| {
-       $keyname    = $keydata['name']
-        ssh_authorized_key { "${osusername}@${keyname}":
-            ensure  => present,
-            user    => $user['username'],
-            type    => $keydata['type'],
-            key     => $keydata['key'],
-            require => User[$osusername],
-        }
+      $keyname    = $keydata['name']
+      ssh_authorized_key { "${osusername}@${keyname}":
+        ensure  => present,
+        user    => $user['username'],
+        type    => $keydata['type'],
+        key     => $keydata['key'],
+        require => User[$osusername],
+      }
     }
   }
 
@@ -72,4 +72,12 @@ class profiles::base (
     mode   => '0755',
     source => 'puppet:///modules/profiles/puppet.init',
   }
+
+  file { '/etc/apt/apt.conf.d/03proxy':
+    ensure => file,
+    owner  => 'root',
+    group  => 'root',
+    mode   => '0644',
+    source => 'puppet:///modules/profiles/base/apt_proxy.conf',
+  }
 }