summaryrefslogtreecommitdiff
path: root/manifests/proxy-client.pp
blob: ea0a29c86f146ca05943f09f64d7eb5dc52eeadf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
  }
}