Puppet Class: postgresql::postgis

Defined in:
modules/postgresql/manifests/postgis.pp

Overview

Class: postgresql::postgis

This class installs postgis packages

Parameters:

Actions:

Install postgis

Requires:

Sample Usage:

include postgresql::postgis

Parameters:

  • ensure (Any) (defaults to: 'present')
  • postgresql_postgis_package (Any) (defaults to: $::lsbdistcodename)


15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'modules/postgresql/manifests/postgis.pp', line 15

class postgresql::postgis(
    $ensure = 'present',
    $postgresql_postgis_package = $::lsbdistcodename ? {
        'stretch' => 'postgresql-9.6-postgis-2.3',
        'buster' => 'postgresql-11-postgis-3',
    },
) {
    $postgis_packages = [
        $postgresql_postgis_package,
        "${postgresql_postgis_package}-scripts",
        'postgis',
    ]

    if debian::codename::eq('buster') {
        apt::package_from_component { 'postgis':
            component => 'component/postgis',
            packages  => $postgis_packages,
        }
    } else {
        package { $postgis_packages:
            ensure  => $ensure,
        }
    }
}