File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change 56
56
state : touch
57
57
group : postgres
58
58
owner : postgres
59
+
60
+ - name : import /etc/tmpfiles.d/pgbouncer.conf
61
+ template :
62
+ src : files/pgbouncer_config/tmpfiles.d-pgbouncer.conf.j2
63
+ dest : /etc/tmpfiles.d/pgbouncer.conf
64
+ become : yes
59
65
60
66
- name : PgBouncer - add permissions for pgbouncer user
61
67
become : yes
67
73
with_items :
68
74
- " host all pgbouncer 127.0.0.1/32 md5"
69
75
- " # Allow connection by pgbouncer user"
70
-
71
- - name : import /etc/tmpfiles.d/pgbouncer.conf
72
- template :
73
- src : files/pgbouncer_config/tmpfiles.d-pgbouncer.conf.j2
74
- dest : /etc/tmpfiles.d/pgbouncer.conf
76
+
77
+ # Run PgBouncer SQL script
78
+ - name : Transfer init SQL files
79
+ copy :
80
+ src : files/pgbouncer_config/pgbouncer_auth_schema.sql
81
+ dest : /tmp/00-schema.sql
82
+
83
+ - name : Execute init SQL files
75
84
become : yes
85
+ become_user : postgres
86
+ shell :
87
+ cmd : /usr/lib/postgresql/bin/psql -f /tmp/00-schema.sql
76
88
77
89
# Add fail2ban filter
78
90
- name : import jail.d/pgbouncer.conf
You can’t perform that action at this time.
0 commit comments