mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-17 02:13:06 -06:00
update ansible mysql dependencies
This commit is contained in:
@@ -1,5 +1,17 @@
|
||||
---
|
||||
|
||||
- name: Make sure mariadb is present
|
||||
become: true
|
||||
yum:
|
||||
name: mariadb
|
||||
state: present
|
||||
|
||||
- name: Make sure pymysql is present
|
||||
become: true
|
||||
pip:
|
||||
name: pymysql
|
||||
state: present
|
||||
|
||||
- name: Create application DB user
|
||||
mysql_user:
|
||||
login_host: "{{ atl_db_host }}"
|
||||
@@ -11,16 +23,6 @@
|
||||
|
||||
- block:
|
||||
|
||||
- name: Update root privs for new user
|
||||
postgresql_privs:
|
||||
login_host: "{{ atl_db_host }}"
|
||||
login_user: "{{ atl_db_root_user }}"
|
||||
login_password: "{{ atl_db_root_password }}"
|
||||
database: postgres
|
||||
roles: "{{ atl_db_root_user }}"
|
||||
objs: "{{ atl_jdbc_user }}"
|
||||
type: group
|
||||
|
||||
# RDS does not allow changing the collation on an existing DB, it only allows collation change on creation of db. If the db already exists, we need the “create new application database” task to be skipped, idempotence can not be relied upon as we cant be certain the collation of the existing db
|
||||
- name: Create new application database
|
||||
mysql_db:
|
||||
@@ -31,8 +33,7 @@
|
||||
name: "{{ atl_jdbc_db_name }}"
|
||||
encoding: "{{ atl_jdbc_encoding }}"
|
||||
collation: "{{ atl_jdbc_collation }}"
|
||||
register: db_created
|
||||
when: "atl_jdbc_db_name not in (dbcluster_db_names.query_result | map(attribute='datname') )"
|
||||
register: db_created
|
||||
|
||||
tags:
|
||||
- new_only
|
||||
|
||||
Reference in New Issue
Block a user