mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-21 12:21:04 +01:00
Compare commits
2 Commits
cc77575b1e
...
839e1209ab
Author | SHA1 | Date | |
---|---|---|---|
839e1209ab | |||
d7afa04bf3 |
@ -25,7 +25,7 @@ Configure the role by setting the required variables. These can be set in the pl
|
||||
|
||||
## Execute SQL commands
|
||||
```bash
|
||||
docker exec -it central-mariadb mysql -u root -p
|
||||
docker exec -it central-mariadb mariadb -u root -p
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
@ -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}}"
|
||||
|
Loading…
Reference in New Issue
Block a user