Last change
on this file since 207 was
174,
checked in by sebas, 15 years ago
|
ejemplo del cliente + activacion del servicio apt-cache
|
File size:
952 bytes
|
Line | |
---|
1 | # Example: |
---|
2 | # debproxy::activateclient { dist: |
---|
3 | # debproxyhost => "thrasy", |
---|
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 | require => Package["apt-cacher"] |
---|
11 | } |
---|
12 | } |
---|
13 | |
---|
14 | |
---|
15 | class debproxy::server { |
---|
16 | package { "apt-cacher": ensure => installed } |
---|
17 | |
---|
18 | line { aptcacher_off: |
---|
19 | file => "/etc/default/apt-cacher", |
---|
20 | line => 'AUTOSTART=0', |
---|
21 | ensure => absent, |
---|
22 | require => Package["apt-cacher"] |
---|
23 | } |
---|
24 | line { aptcacher_on: |
---|
25 | file => "/etc/default/apt-cacher", |
---|
26 | line => 'AUTOSTART=1', |
---|
27 | ensure => present, |
---|
28 | require => Package["apt-cacher"] |
---|
29 | } |
---|
30 | |
---|
31 | service { |
---|
32 | "apt-cacher": |
---|
33 | enable => true, |
---|
34 | ensure => running, |
---|
35 | # not sure if i'm correct with the last statement... about line. |
---|
36 | subscribe => [ Package["apt-cacher"], line["aptcacher_on"] ], |
---|
37 | } |
---|
38 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.