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