summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/defaults.rb3
-rw-r--r--lib/puppet/rails.rb14
2 files changed, 13 insertions, 4 deletions
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index ef194bc31..9d992dd74 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -655,6 +655,9 @@ module Puppet
used when networked databases are used."],
:dbsocket => [ "", "The database socket location. Only used when networked
databases are used. Will be ignored if the value is an empty string."],
+ :dbconnections => [ 0, "The number of database connections. Only used when
+ networked databases are used. Will be ignored if the value is an empty
+ string or is less than 1."],
:railslog => {:default => "$logdir/rails.log",
:mode => 0600,
:owner => "service",
diff --git a/lib/puppet/rails.rb b/lib/puppet/rails.rb
index ec2d618fa..c941d8f3d 100644
--- a/lib/puppet/rails.rb
+++ b/lib/puppet/rails.rb
@@ -51,10 +51,16 @@ module Puppet::Rails
socket = Puppet[:dbsocket]
args[:socket] = socket unless socket.empty?
- when "oracle_enhanced":
- args[:database] = Puppet[:dbname] unless Puppet[:dbname].empty?
- args[:username] = Puppet[:dbuser] unless Puppet[:dbuser].empty?
- args[:password] = Puppet[:dbpassword] unless Puppet[:dbpassword].empty?
+
+ connections = Puppet[:dbconnections].to_i
+ args[:pool] = connections if connections > 0
+ when "oracle_enhanced":
+ args[:database] = Puppet[:dbname] unless Puppet[:dbname].empty?
+ args[:username] = Puppet[:dbuser] unless Puppet[:dbuser].empty?
+ args[:password] = Puppet[:dbpassword] unless Puppet[:dbpassword].empty?
+
+ connections = Puppet[:dbconnections].to_i
+ args[:pool] = connections if connections > 0
else
raise ArgumentError, "Invalid db adapter %s" % adapter
end