summaryrefslogtreecommitdiff
path: root/manifests/proxy-client.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-10-21 01:59:41 +0200
committermh <mh@immerda.ch>2010-10-21 01:59:41 +0200
commite2ac1b3d8d1713c81c83a695b776dec1c00d2d47 (patch)
tree5ff6553207f4b118562a3be76fc4f7d08638db04 /manifests/proxy-client.pp
parente19c94dcd20c966143c933e22d5a63f350649b6e (diff)
parent4dbcd092817708292de6463777b331c8dbc7e727 (diff)
Merge remote branch 'lelutin/master'
Integrate no custom preference into our new way to manage the preferences. Conflicts: README manifests/default_preferences.pp manifests/init.pp
Diffstat (limited to 'manifests/proxy-client.pp')
-rw-r--r--manifests/proxy-client.pp18
1 files changed, 18 insertions, 0 deletions
diff --git a/manifests/proxy-client.pp b/manifests/proxy-client.pp
new file mode 100644
index 0000000..ea0a29c
--- /dev/null
+++ b/manifests/proxy-client.pp
@@ -0,0 +1,18 @@
+class apt::proxy-client {
+
+ $real_apt_proxy = $apt_proxy ? {
+ "" => "localhost",
+ default => $apt_proxy
+ }
+
+ $real_apt_proxy_port = $apt_proxy_port ? {
+ "" => "3142",
+ default => $apt_proxy_port
+ }
+
+ file { "/etc/apt/apt.conf.d/20proxy":
+ ensure => present,
+ content => "Acquire::http { Proxy \"http://$real_apt_proxy:$real_apt_proxy_port\"; };\n",
+ owner => root, group => 0, mode => 0644;
+ }
+}