Skip to content
Browse files

FreeBSD: install packages via puppet itself

The linux class installs puppet and facter via puppet itself.

Chances are that they are already installed, since you need puppet
before you can run puppet.

_But_, it enables the $puppet_ensure_version and $facter_ensure_version
features (forcing the installed version). So let's do the same in
FreeBSD.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
  • Loading branch information...
1 parent b333a0e commit 2a13f8a56b2acac95c9f59f6957eb5ece386e76d @lelutin lelutin committed Aug 23, 2011
Showing with 14 additions and 3 deletions.
  1. +14 −3 manifests/freebsd.pp
View
17 manifests/freebsd.pp
@@ -1,7 +1,18 @@
class puppet::freebsd inherits puppet::base {
- Service['puppet'] {
- path => '/usr/local/etc/rc.d',
- }
+ if !$puppet_ensure_version { $puppet_ensure_version = 'installed' }
+ package { 'puppet':
+ ensure => $puppet_ensure_version,
+ }
+
+ if !$facter_ensure_version { $facter_ensure_version = 'installed' }
+ package { 'facter':
+ ensure => $facter_ensure_version,
+ }
+
+ Service['puppet'] {
+ path => '/usr/local/etc/rc.d',
+ require => Package[puppet],
+ }
}

0 comments on commit 2a13f8a

Please sign in to comment.
Something went wrong with that request. Please try again.