From 05b0b8ab703760d6d5493b1cd2a28a8b48146afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Sat, 17 Apr 2010 18:14:43 +0300 Subject: [PATCH] Added support for disabling or using thin storedconfigs into puppet::server class. --- puppet/manifests/init.pp | 14 +++++++++++++- puppet/templates/puppetmaster.conf.erb | 3 +++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/puppet/manifests/init.pp b/puppet/manifests/init.pp index 6cd3c27..50042c5 100644 --- a/puppet/manifests/init.pp +++ b/puppet/manifests/init.pp @@ -106,12 +106,24 @@ class puppet::manual inherits puppet::client { # Array containing ports that puppetmaster should listen to. Defaults to # [ "18140", "18141", "18142", "18143", ]. # +# $puppet_storeconfigs: +# Store config type to use. Valid values are "thin", "full" and "none". +# Defaults to "thin". +# class puppet::server inherits puppet::client { if ! $puppet_listenports { $puppet_listenports = [ "18140", "18141", "18142", "18143", ] } - + + case $puppet_storeconfigs { + "": { $puppet_storeconfigs = "thin" } + "thin","full","none": { } + default: { + fail("Invalid value ${puppet_storeconfigs} for variable \$puppet_storeconfigs.") + } + } + package { "puppet-server": ensure => installed, } diff --git a/puppet/templates/puppetmaster.conf.erb b/puppet/templates/puppetmaster.conf.erb index 3370125..47f43b1 100644 --- a/puppet/templates/puppetmaster.conf.erb +++ b/puppet/templates/puppetmaster.conf.erb @@ -12,7 +12,10 @@ # Server bucket store. bucketdir = /srv/puppet/bucket +<% if puppet_storeconfigs != 'none' -%> # Use storeconfigs storeconfigs = true +<% if puppet_storeconfigs == 'thin' %> thin_storedconfigs = true<% end %> dbadapter = sqlite3 dblocation = /srv/puppet/storeconfigs/storeconfigs.db +<% end -%>