Last change
on this file since 289 was
221,
checked in by sebas, 15 years ago
|
sacamos un requisito no necesario + cambiamos el ejemplo.
|
File size:
979 bytes
|
Rev | Line | |
---|
[174] | 1 | # Example: |
---|
| 2 | # debproxy::activateclient { dist: |
---|
[221] | 3 | # debproxyhost => "debproxy-ubuntu", |
---|
[174] | 4 | # } |
---|
[172] | 5 | |
---|
| 6 | define 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] | 14 | class 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 | enable => true, |
---|
| 34 | ensure => running, |
---|
| 35 | subscribe => [ Package["apt-cacher"], file["/etc/default/apt-cacher"]] |
---|
| 36 | } |
---|
[171] | 37 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.