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

Last change on this file since 716 was 699, checked in by sebas@…, 14 years ago

el enable true, no esta necesario aqui

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