1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
- name: "[Alpine] Install package: mariadb mariadb-common mariadb-client python-pymysql"
apk:
name: mariadb mariadb-common mariadb-client python-pymysql
state: present
when:
- ansible_distribution == "Alpine"
- name: "[Archlinux] Install package: mariadb python-pymysql"
pacman:
name:
- mariadb
- python-pymysql
state: present
when:
- ansible_distribution == "Archlinux"
- name: "[Archlinux] Create database structure at: /var/lib/mysql"
command:
cmd: "mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql"
creates: /var/lib/mysql/mysql
when:
- ansible_distribution == "Archlinux"