# Defined Type: confdroid_postgresql::bouncer::bouncer_rule

Defined in:
  manifests/bouncer/bouncer_rule.pp

## Summary

define manages rule entries for bouncer rules

## Overview

confdroid_postgresql::bouncer::bouncer_rule.pp Module name: confdroid_postgresql Author: 12ww1160 (12ww1160@confdroid.com)

Parameters:

- pl_bouncer_db_name (`String`) (defaults to: `undef`) —

  db name for the bouncer rule

- pl_bouncer_host (`String`) (defaults to: `'127.0.0.1'`) —

  IP of the db host to bounce to

- pl_bouncer_host_port (`String`) (defaults to: `'5432'`) —

  port of the db host to bounce to

- pl_bouncer_user (`String`) (defaults to: `undef`) —

  user for the connection. Must be defined in userlist.txt

- pl_bouncer_order (`String`) (defaults to: `undef`) —

  the order in which the rule should appear

See Also:

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

    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31

    # File 'manifests/bouncer/bouncer_rule.pp', line 13

    define confdroid_postgresql::bouncer::bouncer_rule (

      String $pl_bouncer_db_name    = undef,
      String $pl_bouncer_host       = '127.0.0.1',
      String $pl_bouncer_host_port  = '5432',
      String $pl_bouncer_user       = undef,
      String $pl_bouncer_order      = undef,

    ) {
      $pl_bouncer_ini_file    = $confdroid_postgresql::params::pl_bouncer_ini_file
      $pl_bouncer_ini_erb     = $confdroid_postgresql::params::pl_bouncer_ini_erb
      $pl_bouncer_rule_erb    = $confdroid_postgresql::params::pl_bouncer_rule_erb

      concat::fragment { "pl_bouncer_rule_${name}":
        target  => $pl_bouncer_ini_file,
        content => template($pl_bouncer_rule_erb),
        order   => $pl_bouncer_order,
      }
    }