Permalink
Browse files

postgresql: add support for v9.1 on ubuntu precise

  • Loading branch information...
1 parent 51dc3cf commit 28ab90eb48ea8ca6fbb733a1af8f1aa11ea9ec11 @ckaenzig ckaenzig committed Apr 5, 2012
Showing with 47 additions and 0 deletions.
  1. +1 −0 manifests/init.pp
  2. +40 −0 manifests/ubuntu/v9-1.pp
  3. +6 −0 manifests/v9-1.pp
View
@@ -10,6 +10,7 @@
Ubuntu: {
case $lsbdistcodename {
lucid : { include postgresql::debian::v8-4 }
+ precise: { include postgresql::ubuntu::v9-1 }
default: { fail "postgresql not available for ${operatingsystem}/${lsbdistcodename}"}
}
}
View
@@ -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}"
+ }
+ }
+}
View
@@ -6,6 +6,12 @@
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}" }
}
}

0 comments on commit 28ab90e

Please sign in to comment.