aboutsummaryrefslogtreecommitdiffstats
path: root/modules/puppet/templates
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2012-02-10 19:05:33 +0000
committerMichael Scherer <misc@mageia.org>2012-02-10 19:05:33 +0000
commit82138c7590284c843f54212d946e6debde7fa6dc (patch)
treee4c861680379ff1ed1217ee150a237d8ac569be0 /modules/puppet/templates
parent5c53dd98d51378c8aab0c8d5bfece2b075191edb (diff)
downloadpuppet-82138c7590284c843f54212d946e6debde7fa6dc.tar
puppet-82138c7590284c843f54212d946e6debde7fa6dc.tar.gz
puppet-82138c7590284c843f54212d946e6debde7fa6dc.tar.bz2
puppet-82138c7590284c843f54212d946e6debde7fa6dc.tar.xz
puppet-82138c7590284c843f54212d946e6debde7fa6dc.zip
split stored_config in a separate class, and refactor the configuration.
This will ease a switch to postgresql once I found how to solve the issues of bootstrapping it ( for automated reinstallation )
Diffstat (limited to 'modules/puppet/templates')
-rw-r--r--modules/puppet/templates/db_config.pp10
-rw-r--r--modules/puppet/templates/puppet.conf9
2 files changed, 14 insertions, 5 deletions
diff --git a/modules/puppet/templates/db_config.pp b/modules/puppet/templates/db_config.pp
new file mode 100644
index 00000000..337a5043
--- /dev/null
+++ b/modules/puppet/templates/db_config.pp
@@ -0,0 +1,10 @@
+<%- if database == 'sqlite3' -%>
+ dbadapter = sqlite3
+ dblocation = /var/lib/puppet/storeconfigs.db
+<%- else -%>
+ dbadapter = postgresql
+ dbuser = puppet
+ dbpassword = <%= pgsql_password %>
+ dbserver = pgsql.<%= domain %>
+ dbname = puppet
+<%- end -%>
diff --git a/modules/puppet/templates/puppet.conf b/modules/puppet/templates/puppet.conf
index 18b35166..2be6e45d 100644
--- a/modules/puppet/templates/puppet.conf
+++ b/modules/puppet/templates/puppet.conf
@@ -1,3 +1,4 @@
+<% db_config = scope.lookupvar('puppet::stored_config::db_config') %>
[main]
# The Puppet log directory.
# The default value is '$vardir/log'.
@@ -14,8 +15,7 @@
modulepath = $confdir/modules:$confdir/deployment:$confdir/external:/usr/share/puppet/modules
queue_type = stomp
queue_source = stomp://localhost:61613
- dbadapter = sqlite3
- dblocation = /var/lib/puppet/storeconfigs.db
+<%= db_config %>
[master]
certname = puppet.<%= domain %>
@@ -28,10 +28,9 @@
# Never remove this:
# Store config is used to populate others configs
storeconfigs = true
- dbadapter = sqlite3
- dblocation = /var/lib/puppet/storeconfigs.db
+ async_storeconfigs = true
+<%= db_config %>
- async_storeconfigs = true
[agent]
server = puppet.<%= domain %>