diff options
author | Michael Scherer <misc@mageia.org> | 2010-12-07 02:40:32 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2010-12-07 02:40:32 +0000 |
commit | 9d18ca79797f2fad7dde59cad6b3f9f782be91c5 (patch) | |
tree | 8e56ccbcd1f6975f3af8e82f91d77e594a21d8b6 /modules/postgresql | |
parent | 5b77012b8dc6042994a72456b86778379b6bde1e (diff) | |
download | puppet-9d18ca79797f2fad7dde59cad6b3f9f782be91c5.tar puppet-9d18ca79797f2fad7dde59cad6b3f9f782be91c5.tar.gz puppet-9d18ca79797f2fad7dde59cad6b3f9f782be91c5.tar.bz2 puppet-9d18ca79797f2fad7dde59cad6b3f9f782be91c5.tar.xz puppet-9d18ca79797f2fad7dde59cad6b3f9f782be91c5.zip |
- use a loop, and a fact, instead of cut and paste and hardcoded ip
Diffstat (limited to 'modules/postgresql')
-rw-r--r-- | modules/postgresql/templates/pg_hba.conf | 35 |
1 files changed, 13 insertions, 22 deletions
diff --git a/modules/postgresql/templates/pg_hba.conf b/modules/postgresql/templates/pg_hba.conf index 4dd9906c..57b46162 100644 --- a/modules/postgresql/templates/pg_hba.conf +++ b/modules/postgresql/templates/pg_hba.conf @@ -80,25 +80,20 @@ # Nanar: # This bypass global config for specific user/base -host epoll epoll 127.0.0.1/32 md5 -host epoll epoll ::1/128 md5 -hostssl epoll epoll 212.85.158.146/32 md5 -hostssl epoll epoll 2a02:2178:2:7::2/128 md5 +<% -host mirrors mirrors 127.0.0.1/32 md5 -host mirrors mirrors ::1/128 md5 -hostssl mirrors mirrors 212.85.158.146/32 md5 -hostssl mirrors mirrors 2a02:2178:2:7::2/128 md5 - -host transifex transifex 127.0.0.1/32 md5 -host transifex transifex ::1/128 md5 -hostssl transifex transifex 212.85.158.146/32 md5 -hostssl transifex transifex 2a02:2178:2:7::2/128 md5 - -host bugs bugs 127.0.0.1/32 md5 -host bugs bugs ::1/128 md5 -hostssl bugs bugs 212.85.158.146/32 md5 -hostssl bugs bugs 2a02:2178:2:7::2/128 md5 +# FIXME ip v6 is hardcoded, facter do not seems to support +# fetch it +db = ['epoll','mirrors','transifex','bugs','sympa'] +for i in db +%> +host <%= i %> <%= i %> 127.0.0.1/32 md5 +host <%= i %> <%= i %> ::1/128 md5 +hostssl <%= i %> <%= i %> <%= ipaddress %>/32 md5 +hostssl <%= i %> <%= i %> 2a02:2178:2:7::2/128 md5 +<% +end +%> # When creating the database ( with bin/checkstup.pl ) bugzilla need to # access to template1 ( https://bugzilla.mozilla.org/show_bug.cgi?id=542507 ) @@ -107,10 +102,6 @@ host template1 bugs ::1/128 md5 hostssl template1 bugs 212.85.158.146/32 md5 hostssl template1 bugs 2a02:2178:2:7::2/128 md5 -host sympa sympa 127.0.0.1/32 md5 -host sympa sympa ::1/128 md5 -hostssl sympa sympa 212.85.158.146/32 md5 -hostssl sympa sympa 2a02:2178:2:7::2/128 md5 # "local" is for Unix domain socket connections only local all all ident map=local |