Skip to content

Commit

Permalink
postgresql: add support for v9.1 on ubuntu precise
Browse files Browse the repository at this point in the history
  • Loading branch information
ckaenzig committed Apr 5, 2012
1 parent 51dc3cf commit 28ab90e
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
Ubuntu: { Ubuntu: {
case $lsbdistcodename { case $lsbdistcodename {
lucid : { include postgresql::debian::v8-4 } lucid : { include postgresql::debian::v8-4 }
precise: { include postgresql::ubuntu::v9-1 }
default: { fail "postgresql not available for ${operatingsystem}/${lsbdistcodename}"} default: { fail "postgresql not available for ${operatingsystem}/${lsbdistcodename}"}
} }
} }
Expand Down
40 changes: 40 additions & 0 deletions manifests/ubuntu/v9-1.pp
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
==Class: postgresql::ubuntu::v9-1
Parameters:
$postgresql_data_dir:
set the data directory path, which is used to store all the databases
*/
class postgresql::ubuntu::v9-1 {

$version = "9.1"

case $lsbdistcodename {
'precise': {

include postgresql::debian::base

service {"postgresql":
ensure => running,
enable => true,
hasstatus => true,
start => "/etc/init.d/postgresql start ${version}",
status => "/etc/init.d/postgresql status ${version}",
stop => "/etc/init.d/postgresql stop ${version}",
restart => "/etc/init.d/postgresql restart ${version}",
require => Package["postgresql-common"],
}

exec { "reload postgresql ${version}":
refreshonly => true,
command => "/etc/init.d/postgresql reload ${version}",
}
}

default: {
fail "${name} not available for ${operatingsystem}/${lsbdistcodename}"
}
}
}
6 changes: 6 additions & 0 deletions manifests/v9-1.pp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
default: { fail "postgresql 9.1 not available for ${operatingsystem}/${lsbdistcodename}"} default: { fail "postgresql 9.1 not available for ${operatingsystem}/${lsbdistcodename}"}
} }
} }
Ubuntu: {
case $lsbdistcodename {
lucid : { include postgresql::debian::v9-1 }
default: { fail "postgresql 9.1 not available for ${operatingsystem}/${lsbdistcodename}"}
}
}
default: { notice "Unsupported operatingsystem ${operatingsystem}" } default: { notice "Unsupported operatingsystem ${operatingsystem}" }
} }
} }

0 comments on commit 28ab90e

Please sign in to comment.