Last change
on this file since 319 was
221,
checked in by sebas, 15 years ago
|
sacamos un requisito no necesario + cambiamos el ejemplo.
|
File size:
979 bytes
|
Line | |
---|
1 | # Example: |
---|
2 | # debproxy::activateclient { dist: |
---|
3 | # debproxyhost => "debproxy-ubuntu", |
---|
4 | # } |
---|
5 | |
---|
6 | define debproxy::activateclient ( $debproxyhost ) { |
---|
7 | file { "/etc/apt/apt.conf.d/01proxy": |
---|
8 | ensure => "present", |
---|
9 | content => "Acquire::http { Proxy \"http://$debproxyhost:3142\"; };\n", |
---|
10 | } |
---|
11 | } |
---|
12 | |
---|
13 | |
---|
14 | class debproxy::server { |
---|
15 | package { "apt-cacher": ensure => installed } |
---|
16 | |
---|
17 | file { "/etc/default/apt-cacher": ensure => present, checksum => mtime } |
---|
18 | |
---|
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 | enable => true, |
---|
34 | ensure => running, |
---|
35 | subscribe => [ Package["apt-cacher"], file["/etc/default/apt-cacher"]] |
---|
36 | } |
---|
37 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.