Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add support for JDBC connector.
Modify params.pp to abstract the package name for the postgresql JDBC
connector and add Class['postgresql::java'].  Also update the README.md
to mention the availability of this class.
  • Loading branch information
razorsedge committed Feb 6, 2013
commit 556ab32b7361685ef660054ec384e2069836f5e9
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,15 @@ The name of the postgresql client package.
####`package_ensure`
The ensure parameter passed on to postgresql client package resource.

###postgresql::java
This class installs postgresql bindings for Java (JDBC). Alter the following parameters if you have a custom version you would like to install (Note: don't forget to make sure to add any necessary yum or apt repositories if specifying a custom version):

####`package_name`
The name of the postgresql java package.

####`package_ensure`
The ensure parameter passed on to postgresql java package resource.

### Custom Functions

If you need to generate a postgres encrypted password, use `postgresql_password`. You can call it from your production manifests if you don’t mind them containing the clear text versions of your passwords, or you can call it from the command line and then copy and paste the encrypted password into your manifest:
Expand Down
26 changes: 26 additions & 0 deletions manifests/java.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Class: postgresql::java
#
# This class installs the postgresql jdbc connector.
#
# Parameters:
# [*java_package_name*] - The name of the postgresql java package.
#
# Actions:
#
# Requires:
#
# Sample Usage:
#
# class { 'postgresql::java': }
#
class postgresql::java (
$package_name = $postgresql::params::java_package_name,
$package_ensure = 'present'
) inherits postgresql::params {

package { 'postgresql-jdbc':
ensure => $package_ensure,
name => $package_name,
}

}
3 changes: 3 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
$client_package_name = 'postgresql'
$server_package_name = 'postgresql-server'
$devel_package_name = 'postgresql-devel'
$java_package_name = 'postgresql-jdbc'
$service_name = 'postgresql'
$bindir = '/usr/bin'
$datadir = '/var/lib/pgsql/data'
Expand All @@ -111,6 +112,7 @@
$client_package_name = "postgresql${package_version}"
$server_package_name = "postgresql${package_version}-server"
$devel_package_name = "postgresql${package_version}-devel"
$java_package_name = "postgresql${package_version}-jdbc"
$service_name = "postgresql-${version}"
$bindir = "/usr/pgsql-${version}/bin"
$datadir = "/var/lib/pgsql/${version}/data"
Expand Down Expand Up @@ -145,6 +147,7 @@
$client_package_name = "postgresql-client-${version}"
$server_package_name = "postgresql-${version}"
$devel_package_name = 'libpq-dev'
$java_package_name = 'libpostgresql-jdbc-java'
$bindir = "/usr/lib/postgresql/${version}/bin"
$datadir = "/var/lib/postgresql/${version}/main"
$confdir = "/etc/postgresql/${version}/main"
Expand Down