From 618384cf08340b34a4eaf1022d200c1acb8161f4 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Wed, 19 Jan 2011 20:09:16 -0500 Subject: Support puppet client for FreeBSD Some pieces of the puzzle are missing for being able to manage puppet in FreeBSD. * Add a default puppet client config template for FreeBSD * In FreeBSD, puppet.conf is not in /etc/puppet/ so let's provide a value for this variable in init.pp. * The rc script for starting and stopping puppet is not located in /etc/rc.d so let's signify this to Service[puppet] Signed-off-by: Gabriel Filion --- manifests/init.pp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'manifests/init.pp') diff --git a/manifests/init.pp b/manifests/init.pp index e9d9748..69d9b18 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -19,6 +19,13 @@ # class puppet { + $puppet_default_config = $kernel ? { + freebsd => '/usr/local/etc/puppet/puppet.conf', + default => '/etc/puppet/puppet.conf', + } + + if $puppet_config == '' { $puppet_config = $puppet_default_config } + case $kernel { linux: { case $operatingsystem { -- cgit v1.2.3 From 529e6ec7a0bfd2d82b0819b50cf2033ae3c91bfc Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Tue, 23 Aug 2011 16:29:38 -0400 Subject: Include the OS-specific class for FreeBSD The FreeBSD class was previously defined but not included by the puppet class in init.pp Signed-off-by: Gabriel Filion --- manifests/init.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/init.pp') diff --git a/manifests/init.pp b/manifests/init.pp index 69d9b18..fb10773 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -36,6 +36,7 @@ class puppet { } } openbsd: { include puppet::openbsd } + freebsd: { include puppet::freebsd } default: { include puppet::base } } -- cgit v1.2.3 From 000165503f79e6214047ba2622bdabf4176a68a0 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Tue, 23 Aug 2011 16:53:14 -0400 Subject: Move $puppet_default_config_dir to the puppet class We'd like to use this variable in the 'puppet' class since we're defining the path to another config file, there. Since puppet::puppetmaster inherits the puppet class, the variable will be defined appropriately. Just to make sure we get the value from the right place, let's also use the qualified variable name. To avoid useless repetitions in the variable name, change the variable name from $puppet_default_config_dir to $default_config_dir. Signed-off-by: Gabriel Filion --- manifests/init.pp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'manifests/init.pp') diff --git a/manifests/init.pp b/manifests/init.pp index fb10773..c05631a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -19,15 +19,17 @@ # class puppet { - $puppet_default_config = $kernel ? { - freebsd => '/usr/local/etc/puppet/puppet.conf', - default => '/etc/puppet/puppet.conf', + $default_config_dir = $operatingsystem ? { + freebsd => "/usr/local/etc/puppet", + default => "/etc/puppet", } + $puppet_default_config = "$default_config_dir/puppet.conf" + if $puppet_config == '' { $puppet_config = $puppet_default_config } case $kernel { - linux: { + linux: { case $operatingsystem { gentoo: { include puppet::gentoo } centos: { include puppet::centos } -- cgit v1.2.3