Puppet Class: postgresql::lib::devel

Inherits:
postgresql::params
Defined in:
manifests/lib/devel.pp

Summary

This class installs postgresql development libraries.

Overview

Parameters:

  • package_name (String) (defaults to: $postgresql::params::devel_package_name)

    Override devel package name

  • package_ensure (Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]) (defaults to: 'present')

    Ensure the development libraries are installed

  • link_pg_config (Boolean) (defaults to: $postgresql::params::link_pg_config)

    If the bin directory used by the PostgreSQL page is not /usr/bin or /usr/local/bin, symlinks pg_config from the package’s bin dir into usr/bin (not applicable to Debian systems). Set to false to disable this behavior.



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'manifests/lib/devel.pp', line 12

class postgresql::lib::devel (
  Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]] $package_ensure = 'present',
  String $package_name    = $postgresql::params::devel_package_name,
  Boolean $link_pg_config = $postgresql::params::link_pg_config,
) inherits postgresql::params {
  if $facts['os']['family'] == 'Gentoo' {
    fail('osfamily Gentoo does not have a separate "devel" package, postgresql::lib::devel is not supported')
  }

  package { 'postgresql-devel':
    ensure => $package_ensure,
    name   => $package_name,
    tag    => 'puppetlabs-postgresql',
  }

  if $link_pg_config {
    if ( $postgresql::params::bindir != '/usr/bin' and $postgresql::params::bindir != '/usr/local/bin') {
      file { '/usr/bin/pg_config':
        ensure => link,
        target => "${postgresql::params::bindir}/pg_config",
      }
    }
  }
}