# Defined Type: confdroid_postgresql::server::pghba::pg_hba_rule

Defined in:
  manifests/server/pghba/pg_hba_rule.pp

## Summary

define manages rule entries for pg_hba configuration file

## Overview

confdroid_postgresql::server::pghba::pg_hba_rule Module name: confdroid_postgresql Author: 12ww1160 (12ww1160@confdroid.com)

Parameters:

- pl_auth_type (`Optional[String]`) (defaults to: `undef`) —

  Specify the authentication type, can be ‘local’, ‘host’, ‘hostssl’ or ‘hostnossl’.

- pl_auth_database (`Optional[String]`) (defaults to: `undef`) —

  Specify the database for the connection

- pl_auth_user (`Optional[String]`) (defaults to: `undef`) —

  Specify the user for the connection

- pl_auth_address (`Optional[String]`) (defaults to: `undef`) —

  Specify IP address or FQDN for the connection, i.e. where to connect FROM.

- pl_auth_method (`Optional[String]`) (defaults to: `undef`) —

  Specify the auth method, can be ‘trust’, ‘reject’, ‘md5’ , ‘password’, ‘gss’, ‘sspi’, ‘ident’, ‘peer’, ‘ldap’, ‘radius’, ‘cert’, ‘pam’,‘bsd’

- pl_auth_option (`Optional[String]`) (defaults to: `undef`) —

  After the auth-method field, there can be field(s) of the form name=value that specify options for the authentication method.

- pl_auth_order (`Optional[String]`) (defaults to: `undef`) —

  Specify the order in which the entry should appear on the list. Lower orders are higher on the list.

- pl_auth_description (`Optional[String]`) (defaults to: `undef`) —

  Specify a description for the entry.

See Also:

- https://www.postgresql.org/docs/9.6/static/auth-pg-hba-conf.html

    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45

    # File 'manifests/server/pghba/pg_hba_rule.pp', line 22

    define confdroid_postgresql::server::pghba::pg_hba_rule (

      Optional[String] $pl_auth_type         = undef,
      Optional[String] $pl_auth_database     = undef,
      Optional[String] $pl_auth_user         = undef,
      Optional[String] $pl_auth_address      = undef,
      Optional[String] $pl_auth_method       = undef,
      Optional[String] $pl_auth_option       = undef,
      Optional[String] $pl_auth_order        = undef,
      Optional[String] $pl_auth_description  = undef,

    ) {
      $pl_pg_hba_conf       = $confdroid_postgresql::params::pl_pg_hba_conf
      $pl_pg_hba_rule_conf  = $confdroid_postgresql::params::pl_pg_hba_rule_conf
      $pl_data_dir          = $confdroid_postgresql::params::pl_data_dir

    # create rule fragment

      concat::fragment { "pl_rule_${name}":
        target  => $pl_pg_hba_conf,
        content => template($pl_pg_hba_rule_conf),
        order   => $pl_auth_order,
      }
    }