source: trunk/puppet/manifests/classes/debproxy.pp @ 215

Last change on this file since 215 was 215, checked in by sebas, 15 years ago

en el client, no hace falta el paquete servidor

File size: 1007 bytes
Line 
1# Example:
2#    debproxy::activateclient { dist:
3#       debproxyhost => "thrasy",
4#    }
5
6define debproxy::activateclient ( $debproxyhost ) {
7   file { "/etc/apt/apt.conf.d/01proxy":
8   ensure  => "present",
9   content => "Acquire::http { Proxy \"http://$debproxyhost:3142\"; };\n",
10#   require => Package["apt-cacher"]
11   }
12}
13
14
15class debproxy::server {
16    package { "apt-cacher": ensure => installed }
17
18    file { "/etc/default/apt-cacher": ensure => present, checksum => mtime }
19
20    line { aptcacher_off:
21       file    => "/etc/default/apt-cacher",
22       line    => 'AUTOSTART=0',
23       ensure  => absent,
24       require => Package["apt-cacher"]
25    }
26    line { aptcacher_on:
27       file    => "/etc/default/apt-cacher",
28       line    => 'AUTOSTART=1',
29       ensure  => present,
30       require => Package["apt-cacher"]
31    }
32
33    service { "apt-cacher":
34       enable    => true,
35       ensure    => running,
36       subscribe => [ Package["apt-cacher"], file["/etc/default/apt-cacher"]]
37    }
38}
Note: See TracBrowser for help on using the repository browser.