diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-01-17 17:28:59 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-01-17 17:28:59 +0000 |
commit | 86114729e8c8288e12be7e494adfc302230f3931 (patch) | |
tree | 8be1c89fa1348830b49cc43992c8286c7855ef68 /modules/postgresql/manifests/hba_entry.pp | |
parent | ebe4bbc484513d496722d9d5fc60646cc3faa587 (diff) | |
download | puppet-86114729e8c8288e12be7e494adfc302230f3931.tar puppet-86114729e8c8288e12be7e494adfc302230f3931.tar.gz puppet-86114729e8c8288e12be7e494adfc302230f3931.tar.bz2 puppet-86114729e8c8288e12be7e494adfc302230f3931.tar.xz puppet-86114729e8c8288e12be7e494adfc302230f3931.zip |
Add postgresql::hba_entry and postgresql::var
Diffstat (limited to 'modules/postgresql/manifests/hba_entry.pp')
-rw-r--r-- | modules/postgresql/manifests/hba_entry.pp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/modules/postgresql/manifests/hba_entry.pp b/modules/postgresql/manifests/hba_entry.pp new file mode 100644 index 00000000..bc8afcc3 --- /dev/null +++ b/modules/postgresql/manifests/hba_entry.pp @@ -0,0 +1,40 @@ +# == Define: postgresql::hba_entry +# +# Set a new entry to pg_hba.conf file +# +# === Parameters +# +# See pgsql doc for more details about pg_hba.conf parameters : +# http://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html +# +# [*namevar*] +# namevar is not used. +# +# [*type*] +# can be local, host, hostssl, hostnossl +# +# [*database*] +# database name +# +# [*user*] +# user name +# +# [*address*] +# host name or IP address range +# +# [*method*] +# authentication method to use +# +define postgresql::hba_entry( + $type, + $database, + $user, + $address, + $method +) { + include postgresql::var + Postgresql::Pg_hba <| title == $postgresql::var::hba_file |> { + conf_lines +> "${type} ${database} ${user} ${address} ${method}", + } +} +# vim: sw=2 |