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:
@@ -3,12 +3,22 @@
|
|||||||
become: true
|
become: true
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
|
atl_db_host: "localhost"
|
||||||
|
atl_jdbc_user: "jira"
|
||||||
|
atl_jdbc_db_name: "jira"
|
||||||
|
|
||||||
|
# Set on commandline
|
||||||
|
# atl_jdbc_password:
|
||||||
|
# atl_db_root_password:
|
||||||
|
|
||||||
atl_jdbc_encoding: 'UNICODE'
|
atl_jdbc_encoding: 'UNICODE'
|
||||||
atl_jdbc_collation: 'C'
|
atl_jdbc_collation: 'C'
|
||||||
atl_jdbc_ctype: 'C'
|
atl_jdbc_ctype: 'C'
|
||||||
atl_jdbc_template: 'template0'
|
atl_jdbc_template: 'template0'
|
||||||
|
|
||||||
|
|
||||||
atl_product_user: 'jira'
|
atl_product_user: 'jira'
|
||||||
|
atl_use_system_jdk: true
|
||||||
|
|
||||||
atl_write_tags: false
|
atl_write_tags: false
|
||||||
|
|
||||||
@@ -16,12 +26,12 @@
|
|||||||
- role: linux_common
|
- role: linux_common
|
||||||
- role: aws_common
|
- role: aws_common
|
||||||
- role: postgres_install
|
- role: postgres_install
|
||||||
|
- role: database_init
|
||||||
# - role: aws_shared_fs_config
|
|
||||||
# - role: product_common
|
# - role: product_common
|
||||||
|
|
||||||
# - role: product_install
|
# - role: product_install
|
||||||
# tags: [skip_on_stack_update]
|
# tags: [skip_on_stack_update]
|
||||||
# - role: database_init
|
|
||||||
# tags: [skip_on_stack_update]
|
# tags: [skip_on_stack_update]
|
||||||
# - role: restore_backups
|
# - role: restore_backups
|
||||||
# - role: jira_config
|
# - role: jira_config
|
||||||
|
|||||||
@@ -20,8 +20,24 @@
|
|||||||
cmd: "/usr/pgsql-{{ postgres_version }}/bin/postgresql{{ postgres_version_short }}-setup initdb"
|
cmd: "/usr/pgsql-{{ postgres_version }}/bin/postgresql{{ postgres_version_short }}-setup initdb"
|
||||||
creates: "/var/lib/pgsql/{{ postgres_version }}/data/"
|
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
|
- name: Start Postgres server
|
||||||
service:
|
service:
|
||||||
name: "postgresql-{{ postgres_version }}.service"
|
name: "postgresql-{{ postgres_version }}.service"
|
||||||
enabled: true
|
enabled: true
|
||||||
state: started
|
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