add restore from backup support

This commit is contained in:
ace
2023-02-17 18:13:08 +03:00
parent 4f40c189f7
commit a2cfbde7e3
7 changed files with 42 additions and 40 deletions

View File

@ -7,7 +7,7 @@
tags: postgresql_configuration
- name: "PostgreSQL initdb"
become_user: "{{ postgresql_superuser_name }}"
become_user: "{{ postgresql_superuser_username }}"
shell: "/usr/lib/postgresql/{{ postgresql_major_version }}/bin/initdb -D {{ postgresql_data_dir }} --auth-local peer --auth-host {{ postgresql_password_encryption_algorithm }} --no-instructions"
register: initdb
changed_when: "'exists but is not empty' not in initdb.stderr"