mirror of
https://gitea.0xace.cc/ansible-galaxy/postgresql.git
synced 2024-11-28 17:56:40 +00:00
15 lines
569 B
YAML
15 lines
569 B
YAML
- name: "Install PostgreSQL"
|
|
include_tasks: install.yaml
|
|
tags: postgresql_installation
|
|
|
|
- name: "Configure PostgreSQL"
|
|
include_tasks: config.yaml
|
|
tags: postgresql_configuration
|
|
|
|
- name: "PostgreSQL initdb"
|
|
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"
|
|
failed_when: false
|