Skip to content

Commit

Permalink
Merged changes by lelutin for file source variety and picking versions.
Browse files Browse the repository at this point in the history
I used a class variable rather than global for style reasons.
  • Loading branch information
garthk committed Apr 4, 2012
1 parent 19f9bfc commit 8f1cd25
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -14,9 +14,11 @@ Maintainer of this fork: [Garth Kidd]
cd /etc/puppet/modules
git clone git://github.com/garthk/puppet-apt-cacher-ng apt-cacher-ng

* Edit the definition for your server to include `apt-cacher-ng`:
* Edit the definition for your server to include `apt-cacher-ng`, perhaps
specifying `version`:

class { 'apt-cacher-ng':
# version => '0.4.6-1ubuntu1',
}

* Edit the definition for your clients to include `apt-cacher-ng::client`:
Expand Down
8 changes: 5 additions & 3 deletions manifests/init.pp
@@ -1,6 +1,6 @@
class apt-cacher-ng {
class apt-cacher-ng($version = 'installed') {
package { 'apt-cacher-ng':
ensure => present,
ensure => $version,
}

service { 'apt-cacher-ng':
Expand All @@ -9,7 +9,9 @@
}

file { "/etc/apt-cacher-ng/acng.conf":
source => "puppet:///apt-cacher-ng/acng.conf",
source => ["puppet:///site-apt-cacher-ng/$fqdn/acng.conf",
"puppet:///site-apt-cacher-ng/acng.conf",
"puppet:///apt-cacher-ng/acng.conf"],
notify => Service['apt-cacher-ng'],
require => Package['apt-cacher-ng'],
}
Expand Down

0 comments on commit 8f1cd25

Please sign in to comment.