1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
Ansible_Project/roles/mariadb/tasks/main.yml

21 lines
502 B
YAML
Raw Permalink Normal View History

2022-05-02 17:37:08 +02:00
---
- name: "Install dependencies"
ansible.builtin.apt:
name:
- "mariadb-server"
- "python3-pymysql"
2022-05-02 17:37:08 +02:00
update_cache: true
cache_valid_time: 86400
- name: "Create database"
ansible.builtin.mysql_db:
login_unix_socket: "/var/run/mysqld/mysqld.sock"
2022-05-02 17:37:08 +02:00
name: "{{ db_name }}"
- name: "Create user"
ansible.builtin.mysql_user:
login_unix_socket: "/var/run/mysqld/mysqld.sock"
2022-05-02 17:37:08 +02:00
name: "{{ db_user }}"
password: "{{ db_password }}"
priv: "{{ db_name }}.*:ALL"