Defined Type: postgresql::spatialdb
- Defined in:
- modules/postgresql/manifests/spatialdb.pp
Overview
Definition: postgresql::spatialdb
This definition provides a way to manage spatial dbs
Parameters:
Actions:
Create/drop database
Requires:
Class['postgresql::postgis']
Sample Usage:
postgresql::spatialdb { 'mydb': }
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'modules/postgresql/manifests/spatialdb.pp', line 17
define postgresql::spatialdb(
$ensure = 'present',
$owner = 'postgres',
) {
require ::postgresql::postgis
postgresql::db { $title:
ensure => $ensure,
owner => $owner,
}
postgresql::db::extension { "${title}-postgis":
ensure => $ensure,
database => $title,
extname => 'postgis',
require => Postgresql::Db[$title],
}
postgresql::db::extension { "${title}-hstore":
ensure => $ensure,
database => $title,
extname => 'hstore',
require => Postgresql::Db[$title],
}
}
|