Last change
on this file since 194 was
174,
checked in by sebas, 15 years ago
|
ejemplo del cliente + activacion del servicio apt-cache
|
File size:
952 bytes
|
Rev | Line | |
---|
[174] | 1 | # Example: |
---|
| 2 | # debproxy::activateclient { dist: |
---|
| 3 | # debproxyhost => "thrasy", |
---|
| 4 | # } |
---|
[172] | 5 | |
---|
| 6 | define debproxy::activateclient ( $debproxyhost ) { |
---|
| 7 | file { "/etc/apt/apt.conf.d/01proxy": |
---|
| 8 | ensure => "present", |
---|
[174] | 9 | content => "Acquire::http { Proxy \"http://$debproxyhost:3142\"; };\n", |
---|
[172] | 10 | require => Package["apt-cacher"] |
---|
| 11 | } |
---|
| 12 | } |
---|
| 13 | |
---|
| 14 | |
---|
[171] | 15 | class debproxy::server { |
---|
| 16 | package { "apt-cacher": ensure => installed } |
---|
| 17 | |
---|
| 18 | line { aptcacher_off: |
---|
[172] | 19 | file => "/etc/default/apt-cacher", |
---|
[171] | 20 | line => 'AUTOSTART=0', |
---|
| 21 | ensure => absent, |
---|
| 22 | require => Package["apt-cacher"] |
---|
| 23 | } |
---|
| 24 | line { aptcacher_on: |
---|
[172] | 25 | file => "/etc/default/apt-cacher", |
---|
[171] | 26 | line => 'AUTOSTART=1', |
---|
| 27 | ensure => present, |
---|
| 28 | require => Package["apt-cacher"] |
---|
| 29 | } |
---|
[174] | 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 | } |
---|
[171] | 38 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.