This commit is contained in:
2025-05-30 00:22:44 -04:00
parent 236ec455cc
commit 13ca7761c2
14 changed files with 195 additions and 71 deletions

View File

@@ -0,0 +1,16 @@
- name: Install MariaDB Server
ansible.builtin.apt:
name: mariadb-server
state: present
- name: Change the bind-address to allow Docker
ansible.builtin.lineinfile:
path: /etc/mysql/mariadb.conf.d/50-server.cnf
regex: "^bind-address"
line: "bind-address = 0.0.0.0"
notify: restart_mariadb
- name: Install MySQL Support for Python 3
ansible.builtin.apt:
name: python3-pymysql
state: present

View File

@@ -1,19 +1,10 @@
- name: Install MariaDB Server
ansible.builtin.apt:
name: mariadb-server
state: present
- name: Include Debian-specific tasks
ansible.builtin.include_tasks: debian.yml
when: ansible_os_family == "Debian"
- name: Change the bind-address to allow Docker
ansible.builtin.lineinfile:
path: /etc/mysql/mariadb.conf.d/50-server.cnf
regex: "^bind-address"
line: "bind-address = 0.0.0.0"
notify: restart_mariadb
- name: Install MySQL Support for Python 3
ansible.builtin.apt:
name: python3-pymysql
state: present
- name: Include Rocky Linux-specific tasks
ansible.builtin.include_tasks: rocky.yml
when: ansible_os_family == "RedHat"
- name: Create MariaDB databases
community.mysql.mysql_db:
@@ -27,7 +18,7 @@
community.mysql.mysql_user:
name: "{{ item.name }}"
password: "{{ item.pass }}"
host: '%'
host: "%"
state: present
priv: "{{ item.name }}.*:ALL"
login_unix_socket: /var/run/mysqld/mysqld.sock

View File

@@ -0,0 +1,16 @@
- name: Install MariaDB Server
ansible.builtin.dnf:
name: mariadb-server
state: present
- name: Change the bind-address to allow Docker
ansible.builtin.lineinfile:
path: /etc/my.cnf.d/mariadb-server.cnf
regex: "^bind-address"
line: "bind-address = 0.0.0.0"
notify: restart_mariadb
- name: Install MySQL Support for Python 3
ansible.builtin.apt:
name: python3-pymysql
state: present