summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2010-04-23 14:32:38 +1000
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commitf0a00848d9244f03528f6cd9572989732e4b6fe2 (patch)
tree4126102732955d50274d085b019028392cf3865a /lib
parent8b99367ccedefe0e341a79487ccea2a95f2720a3 (diff)
downloadpuppet-f0a00848d9244f03528f6cd9572989732e4b6fe2.tar.gz
puppet-f0a00848d9244f03528f6cd9572989732e4b6fe2.tar.xz
puppet-f0a00848d9244f03528f6cd9572989732e4b6fe2.zip
Fixes #3582 - Adds dbport configuration option for specifying database port
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/defaults.rb2
-rw-r--r--lib/puppet/rails.rb1
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index 79d74f01f..1f5e0eda4 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -680,6 +680,8 @@ module Puppet
:dbname => [ "puppet", "The name of the database to use." ],
:dbserver => [ "localhost", "The database server for caching. Only
used when networked databases are used."],
+ :dbport => [ "", "The database password for caching. Only
+ used when networked databases are used."],
:dbuser => [ "puppet", "The database user for caching. Only
used when networked databases are used."],
:dbpassword => [ "puppet", "The database password for caching. Only
diff --git a/lib/puppet/rails.rb b/lib/puppet/rails.rb
index 1e02408b8..c3bf383bb 100644
--- a/lib/puppet/rails.rb
+++ b/lib/puppet/rails.rb
@@ -51,6 +51,7 @@ module Puppet::Rails
args[:database] = Puppet[:dblocation]
when "mysql", "postgresql"
args[:host] = Puppet[:dbserver] unless Puppet[:dbserver].empty?
+ args[:port] = Puppet[:dbport] unless Puppet[:dbport].empty?
args[:username] = Puppet[:dbuser] unless Puppet[:dbuser].empty?
args[:password] = Puppet[:dbpassword] unless Puppet[:dbpassword].empty?
args[:database] = Puppet[:dbname]