DCD-224: Move db config to its own role.

This commit is contained in:
Steve Smith
2019-04-17 10:39:10 +10:00
parent 43e5599c10
commit 72fafab5d5
3 changed files with 37 additions and 23 deletions

View File

@@ -0,0 +1,11 @@
extends: default
rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
line-length: disable
truthy: disable

View File

@@ -0,0 +1,26 @@
---
- name: Create application DB user
postgresql_user:
login_host: "{{ atl_db_host }}"
login_user: "{{ atl_db_root_user }}"
login_password: "{{ atl_db_root_user }}"
port: "{{ atl_db_port }}"
name: "{{ atl_jdbc_user }}"
password: "{{ atl_jdbc_password }}"
expires: 'infinity'
tags: db_interaction
- name: Create application database
postgresql_db:
login_host: "{{ atl_db_host }}"
login_user: "{{ atl_db_root_user }}"
login_password: "{{ atl_db_root_user }}"
port: "{{ atl_db_port }}"
name: "{{ atl_jdbc_name }}"
owner: "{{ atl_jdbc_user }}"
encoding: "{{ atl_jdbc_encoding }}"
lc_collate: "{{ atl_jdbc_collation }}"
lc_ctype: "{{ atl_jdbc_ctype }}"
template: "{{ atl_jdbc_template }}"
tags: db_interaction