Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use quote for postgresql parameter in yaml config #108

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
patroni_binary_version: "2.1.5"

patroni_postgresql_version: 11
patroni_postgresql_exists: false
Expand All @@ -17,7 +18,7 @@ patroni_exec_start_pre: "/bin/mkdir -m 2750 -p /var/run/postgresql/{{ patroni_po

patroni_pip_packages:
- { name: "setuptools", state: "latest", umask: "0022", executable: "pip3" }
- { name: "patroni[{{ patroni_dcs }}]", state: "present", umask: "0022", executable: "pip3" }
- { name: "patroni[{{ patroni_dcs }}]=={{ patroni_binary_version }}", state: "present", umask: "0022", executable: "pip3" }

patroni_replication_username: replicator
patroni_replication_password: repuserpasswd
Expand Down
4 changes: 2 additions & 2 deletions templates/patroni.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ bootstrap:
{% if patroni_bootstrap_dcs_postgresql_parameters |d([], true) |length > 0 %}
parameters:
{% for guc in patroni_bootstrap_dcs_postgresql_parameters %}
{{ guc.option }}: {{ guc.value }}
{{ guc.option }}: "{{ guc.value }}"
{% endfor %}
{% endif %}
{% if patroni_bootstrap_dcs_postgresql_recovery_conf |d([], true) |length > 0 %}
Expand Down Expand Up @@ -215,7 +215,7 @@ postgresql:
{% if patroni_postgresql_parameters |d([], true) |length > 0 %}
parameters:
{% for guc in patroni_postgresql_parameters %}
{{ guc.option }}: {{ guc.value }}
{{ guc.option }}: "{{ guc.value }}"
{% endfor %}
{% endif %}
{% if patroni_postgresql_pg_hba |d([], true) |length > 0 %}
Expand Down