solved database permission bug

This commit is contained in:
Kevin Veen-Birkenbach 2024-04-03 22:08:39 +02:00
parent d7afa04bf3
commit 839e1209ab

View File

@ -48,6 +48,12 @@
login_host: 127.0.0.1
login_port: 3306
- name: Grant database privileges
ansible.builtin.shell:
cmd: "docker exec central-mariadb mariadb -u root -p{{ central_mariadb_root_password }} -e \"GRANT ALL PRIVILEGES ON {{database_name}}.* TO '{{database_username}}'@'%';\""
args:
executable: /bin/bash
- name: "Create database user: {{ database_username }}"
mysql_user:
name: "{{database_username}}"