20 lines
612 B
YAML
20 lines
612 B
YAML
---
|
|
- name: "Database | Crate database"
|
|
community.mysql.mysql_db:
|
|
name: "{{ dmarcsrg_database }}"
|
|
state: present
|
|
login_unix_socket: "{{ mysql_socket }}"
|
|
login_user: root
|
|
register: mariadb_created
|
|
delegate_to: "{{ database_host }}"
|
|
|
|
- name: "Database | Create database user"
|
|
community.mysql.mysql_user:
|
|
name: "{{ dmarcsrg_database }}"
|
|
password: "{{ dmarcsrg_database_password }}"
|
|
priv: "{{ dmarcsrg_database }}.*:ALL"
|
|
host: "{{ inventory_hostname }}"
|
|
state: present
|
|
login_unix_socket: "{{ mysql_socket }}"
|
|
login_user: root
|
|
delegate_to: "{{ database_host }}"
|