diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-01-17 12:46:39 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-01-17 12:46:39 +0000 |
commit | a33f73c126bf7f0f4761a798461072577d69048a (patch) | |
tree | a1180aaedea4b6f5a8dd724d611fce8e2804a0df /modules/postgresql | |
parent | b63af512c8b06b2fdd4c6a93755436df98ada69b (diff) | |
download | puppet-a33f73c126bf7f0f4761a798461072577d69048a.tar puppet-a33f73c126bf7f0f4761a798461072577d69048a.tar.gz puppet-a33f73c126bf7f0f4761a798461072577d69048a.tar.bz2 puppet-a33f73c126bf7f0f4761a798461072577d69048a.tar.xz puppet-a33f73c126bf7f0f4761a798461072577d69048a.zip |
Add class postgresql::pg_hba
This adds a parameter conf_lines which can be used as an array to insert
new configuration in the pg_hba.conf file.
Diffstat (limited to 'modules/postgresql')
-rw-r--r-- | modules/postgresql/manifests/pg_hba.pp | 12 | ||||
-rw-r--r-- | modules/postgresql/manifests/server.pp | 6 | ||||
-rw-r--r-- | modules/postgresql/templates/pg_hba.conf | 10 |
3 files changed, 21 insertions, 7 deletions
diff --git a/modules/postgresql/manifests/pg_hba.pp b/modules/postgresql/manifests/pg_hba.pp new file mode 100644 index 00000000..1ad2fb37 --- /dev/null +++ b/modules/postgresql/manifests/pg_hba.pp @@ -0,0 +1,12 @@ +class postgresql::pg_hba( + $conf_lines = [] +) { + $db = list_exported_ressources('Postgresql::Db_and_user') + + $forum_lang = list_exported_ressources('Phpbb::Locale_db') + + postgresql::config { "${postgresql::server::pgsql_data}/pg_hba.conf": + content => template('postgresql/pg_hba.conf'), + } +} +# vim: sw=2 diff --git a/modules/postgresql/manifests/server.pp b/modules/postgresql/manifests/server.pp index 84be87ad..d2683e7d 100644 --- a/modules/postgresql/manifests/server.pp +++ b/modules/postgresql/manifests/server.pp @@ -35,13 +35,9 @@ class postgresql::server { content => template('postgresql/pam'), } - $db = list_exported_ressources('Postgresql::Db_and_user') - - $forum_lang = list_exported_ressources('Phpbb::Locale_db') + include postgresql::pg_hba postgresql::config { - "$pgsql_data/pg_hba.conf": - content => template('postgresql/pg_hba.conf'); "$pgsql_data/pg_ident.conf": content => template('postgresql/pg_ident.conf'); "$pgsql_data/postgresql.conf": diff --git a/modules/postgresql/templates/pg_hba.conf b/modules/postgresql/templates/pg_hba.conf index 91012a30..6ecafbd4 100644 --- a/modules/postgresql/templates/pg_hba.conf +++ b/modules/postgresql/templates/pg_hba.conf @@ -75,8 +75,14 @@ # TYPE DATABASE USER CIDR-ADDRESS METHOD -# This file is in mageia svn: -# $Id$ + +<%- + for line in @conf_lines +-%> +<%= line %> +<%- + end +-%> # Nanar: # This bypass global config for specific user/base |