mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-17 02:13:06 -06:00
DCD-1123: Setup root Psql user and connectivity permissions.
This commit is contained in:
@@ -20,8 +20,24 @@
|
||||
cmd: "/usr/pgsql-{{ postgres_version }}/bin/postgresql{{ postgres_version_short }}-setup initdb"
|
||||
creates: "/var/lib/pgsql/{{ postgres_version }}/data/"
|
||||
|
||||
- name: Allow local network connections with password
|
||||
postgresql_pg_hba:
|
||||
dest: "/var/lib/pgsql/{{ postgres_version }}/data/pg_hba.conf"
|
||||
contype: host
|
||||
databases: all
|
||||
users: all
|
||||
address: "127.0.0.1/32"
|
||||
method: md5
|
||||
|
||||
- name: Start Postgres server
|
||||
service:
|
||||
name: "postgresql-{{ postgres_version }}.service"
|
||||
enabled: true
|
||||
state: started
|
||||
|
||||
- name: Set Postgres root user password
|
||||
become_user: postgres
|
||||
postgresql_user:
|
||||
name: "{{ atl_db_root_user }}"
|
||||
password: "{{ atl_db_root_password }}"
|
||||
role_attr_flags: "SUPERUSER"
|
||||
|
||||
Reference in New Issue
Block a user