diff --git a/roles/database_config/.yamllint b/roles/database_config/.yamllint new file mode 100644 index 0000000..ad0be76 --- /dev/null +++ b/roles/database_config/.yamllint @@ -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 diff --git a/roles/database_config/tasks/main.yml b/roles/database_config/tasks/main.yml new file mode 100644 index 0000000..b59d21a --- /dev/null +++ b/roles/database_config/tasks/main.yml @@ -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 diff --git a/roles/jira_config/tasks/main.yml b/roles/jira_config/tasks/main.yml index 3802553..9a17ccd 100644 --- a/roles/jira_config/tasks/main.yml +++ b/roles/jira_config/tasks/main.yml @@ -1,28 +1,5 @@ --- -- 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' - -- name: Creat application database - postresql_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 }}" - - name: Create dbconfig.xml template: src: dbconfig.xml.j2