fix initdb with custom user

This commit is contained in:
ace 2023-08-10 18:36:37 +03:00
parent 8bfd98da72
commit 5180e29e2f
Signed by: ace
GPG Key ID: 2C08973DD37A76FD

View File

@ -46,7 +46,7 @@
when: postgresql_wal_g_restore_from_backup
- name: PostgreSQL Initdb
shell: "/usr/pgsql-{{ postgresql_major_version }}/bin/postgresql-{{ postgresql_major_version }}-setup initdb --username {{ postgresql_superuser_username }} --auth-host {{ postgresql_password_encryption_algorithm }}"
shell: "PGSETUP_INITDB_OPTIONS='--username {{ postgresql_superuser_username }} --auth-host {{ postgresql_password_encryption_algorithm }}' /usr/pgsql-{{ postgresql_major_version }}/bin/postgresql-{{ postgresql_major_version }}-setup initdb"
register: initdb
changed_when: "'Data directory is not empty!' not in initdb.stdout"
failed_when: false