Skip to content

Commit 41f0c95

Browse files
authored
Ability to configure connection limits (vitabaks#280)
1 parent 2bdabdc commit 41f0c95

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

roles/postgresql-databases/tasks/main.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
encoding: "{{ item.encoding }}"
1010
lc_collate: "{{ item.lc_collate }}"
1111
lc_ctype: "{{ item.lc_ctype }}"
12-
template: "template0"
12+
template: "{{ item.template | default('template0') }}"
1313
login_host: "127.0.0.1"
1414
login_port: "{{ postgresql_port }}"
1515
login_user: "{{ patroni_superuser_username }}"
1616
login_password: "{{ patroni_superuser_password }}"
17+
conn_limit: "{{ item.conn_limit | default(omit) }}"
1718
state: present
1819
ignore_errors: true
1920
loop: "{{ postgresql_databases | flatten(1) }}"

vars/main.yml

+1
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ postgresql_users: []
148148
# (optional) list of databases to be created (if not already exists)
149149
postgresql_databases: []
150150
# - { db: "mydatabase", encoding: "UTF8", lc_collate: "ru_RU.UTF-8", lc_ctype: "ru_RU.UTF-8", owner: "mydb-user" }
151+
# - { db: "mydatabase2", encoding: "UTF8", lc_collate: "ru_RU.UTF-8", lc_ctype: "ru_RU.UTF-8", owner: "mydb-user", conn_limit: "50" }
151152
# - { db: "", encoding: "UTF8", lc_collate: "en_US.UTF-8", lc_ctype: "en_US.UTF-8", owner: "" }
152153
# - { db: "", encoding: "UTF8", lc_collate: "en_US.UTF-8", lc_ctype: "en_US.UTF-8", owner: "" }
153154

0 commit comments

Comments
 (0)