Puppet Class: postgresql::hba::config

Inherits:
postgresql
Defined in:
manifests/hba/config.pp

Overview

pg_hba concat order

00: header 01-99: user defined rules



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'manifests/hba/config.pp', line 4

class postgresql::hba::config inherits postgresql {

  if($postgresql::datadir==undef)
  {
    $datadir_path=$postgresql::params::datadir_default[$postgresql::version]
  }
  else
  {
    $datadir_path = $postgresql::datadir
  }

  if($postgresql::manage_pghba)
  {
    concat { "${datadir_path}/pg_hba.conf":
      ensure  => 'present',
      owner   => $postgresql::params::postgresuser,
      group   => $postgresql::params::postgresgroup,
      mode    => '0600',
      require => Class['::postgresql::config'],
    }

    concat::fragment{ "header pg_hba ${datadir_path}":
      target  => "${datadir_path}/pg_hba.conf",
      content => template("${module_name}/hba/header.erb"),
      order   => '00',
    }
  }

}