[Mageia-sysadm] [532] - use a loop, and a fact, instead of cut and paste and hardcoded ip
root at mageia.org
root at mageia.org
Tue Dec 7 03:40:32 CET 2010
Revision: 532
Author: misc
Date: 2010-12-07 03:40:32 +0100 (Tue, 07 Dec 2010)
Log Message:
-----------
- use a loop, and a fact, instead of cut and paste and hardcoded ip
Modified Paths:
--------------
puppet/modules/postgresql/templates/pg_hba.conf
Modified: puppet/modules/postgresql/templates/pg_hba.conf
===================================================================
--- puppet/modules/postgresql/templates/pg_hba.conf 2010-12-07 02:40:31 UTC (rev 531)
+++ puppet/modules/postgresql/templates/pg_hba.conf 2010-12-07 02:40:32 UTC (rev 532)
@@ -80,26 +80,21 @@
# 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
+# 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
+%>
-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
-
# When creating the database ( with bin/checkstup.pl ) bugzilla need to
# access to template1 ( https://bugzilla.mozilla.org/show_bug.cgi?id=542507 )
host template1 bugs 127.0.0.1/32 md5
@@ -107,10 +102,6 @@
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20101207/02f1bae8/attachment.html>
More information about the Mageia-sysadm
mailing list