diff --git a/roles/database_init/tasks/mysql.yml b/roles/database_init/tasks/mysql.yml index fe63d45..79a26c0 100644 --- a/roles/database_init/tasks/mysql.yml +++ b/roles/database_init/tasks/mysql.yml @@ -35,14 +35,17 @@ collation: "utf8_bin" # TODO "{{ atl_jdbc_collation }}" register: db_created + - name: Assert ownership of public schema + command: > + mysql --user={{ atl_db_root_user }} --password={{ atl_db_root_password }} {{ atl_jdbc_db_name }} + --host={{ atl_db_host }} --port={{ atl_db_port }} --batch --skip-column-names + --execute="GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on {{ atl_jdbc_db_name }}.* TO '{{ atl_jdbc_user }}'@'{{ atl_db_host }}' IDENTIFIED BY '{{ atl_jdbc_password }}'; flush privileges;" + no_log: true + tags: - new_only -- name: Assert ownership of public schema - command: > - mysql --user={{ atl_jdbc_user }} --password={{ atl_jdbc_password }} {{ atl_jdbc_db_name }} - --host={{ atl_db_host }} --port={{ atl_db_port }} --batch --skip-column-names - --execute="GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on {{ atl_jdbc_db_name }}.* TO '{{ atl_jdbc_user }}'@'{{ atl_db_host }}' IDENTIFIED BY '{{ atl_jdbc_password }}'; flush privileges;" + # - name: Grant privs to root user on public schema # postgresql_query: diff --git a/roles/jira_config/tasks/main.yml b/roles/jira_config/tasks/main.yml index 031e2b2..eacd592 100644 --- a/roles/jira_config/tasks/main.yml +++ b/roles/jira_config/tasks/main.yml @@ -120,7 +120,7 @@ - atl_proxy_name is defined - atl_tomcat_scheme is defined - db_created is undefined or not db_created.changed - - atl_jdbc_engine_map[atl_db_engine] = 'postgres' + - atl_jdbc_engine_map[atl_db_engine] is 'postgres' tags: - skip_on_stack_update ignore_errors: yes # For Molecule as it has no db test framework included @@ -136,7 +136,7 @@ - atl_proxy_name is defined - atl_tomcat_scheme is defined - db_created is undefined or not db_created.changed - - atl_jdbc_engine_map[atl_db_engine] = 'mysql' + - atl_jdbc_engine_map[atl_db_engine] is 'mysql' tags: - skip_on_stack_update ignore_errors: yes # For Molecule as it has no db test framework included