[cubicweb/postgresql] bug fixes in context and pg_hba generation
authorArthur Lutz <arthur.lutz@logilab.fr>
Fri, 10 Jul 2015 18:02:15 +0200
changeset 47 4c22b98c66b0
parent 46 c5cb7d2528ac
child 48 1c70821b96bf
[cubicweb/postgresql] bug fixes in context and pg_hba generation
cubicweb/postgres/init.sls
cubicweb/postgres/pg_hba.conf.jinja
--- a/cubicweb/postgres/init.sls	Fri Jul 10 17:59:15 2015 +0200
+++ b/cubicweb/postgres/init.sls	Fri Jul 10 18:02:15 2015 +0200
@@ -2,6 +2,9 @@
 
 # TODO: allow to declare locales in pillar
 
+locales:
+  pkg.installed
+
 fr_FR.UTF-8:
   locale.present
 en_US.UTF-8:
@@ -37,13 +40,13 @@
     {% endfor %}
     {% endfor %}
     - name: /etc/postgresql/{{ psql_version }}/main/pg_hba.conf
-    - source: salt://postgresql/pg_hba.conf.jinja
+    - source: salt://cubicweb/postgres/pg_hba.conf.jinja
     - user: postgres
     - group: postgres
     - mode: 644
     - template: jinja
     - context:
-        psql_users: {{ psql_users }}
+        users: {{ psql_users }}
     - watch_in:
         service: pg-server
 
--- a/cubicweb/postgres/pg_hba.conf.jinja	Fri Jul 10 17:59:15 2015 +0200
+++ b/cubicweb/postgres/pg_hba.conf.jinja	Fri Jul 10 18:02:15 2015 +0200
@@ -86,8 +86,8 @@
 
 # TYPE  DATABASE        USER            ADDRESS                 METHOD
 {% for user in users %}
-'local  all             {{ name }}                          md5'
-{% endfor %s}
+local  all             {{ user }}                          md5
+{% endfor %}
 # "local" is for Unix domain socket connections only
 local   all             all                                     peer
 # IPv4 local connections: