mirror of
https://gitea.0xace.cc/ansible-galaxy/postgresql.git
synced 2025-01-18 12:02:25 +00:00
add default user custom name support
This commit is contained in:
parent
d0cf0cc32f
commit
a20385be58
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
- name: "PostgreSQL initdb"
|
- name: "PostgreSQL initdb"
|
||||||
become_user: "{{ postgresql_superuser_username }}"
|
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"
|
shell: "/usr/lib/postgresql/{{ postgresql_major_version }}/bin/initdb -D {{ postgresql_data_dir }} --username {{ postgresql_superuser_username }} --auth-local peer --auth-host {{ postgresql_password_encryption_algorithm }} --no-instructions"
|
||||||
register: initdb
|
register: initdb
|
||||||
changed_when: "'exists but is not empty' not in initdb.stderr"
|
changed_when: "'exists but is not empty' not in initdb.stderr"
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
when: postgresql_wal_g_restore
|
when: postgresql_wal_g_restore
|
||||||
|
|
||||||
- name: PostgreSQL Initdb
|
- name: PostgreSQL Initdb
|
||||||
shell: "/usr/pgsql-{{ postgresql_major_version }}/bin/postgresql-{{ postgresql_major_version }}-setup initdb"
|
shell: "/usr/pgsql-{{ postgresql_major_version }}/bin/postgresql-{{ postgresql_major_version }}-setup initdb --username {{ postgresql_superuser_username }} --auth-host {{ postgresql_password_encryption_algorithm }}"
|
||||||
register: initdb
|
register: initdb
|
||||||
changed_when: "'Data directory is not empty!' not in initdb.stdout"
|
changed_when: "'Data directory is not empty!' not in initdb.stdout"
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
Loading…
Reference in New Issue
Block a user