Kris Lamoureux
7adb5f10e9
- Add MariaDB to dev playbook - Set Git user in "users:" - Define Gitea external compose project - Forward SSH port in forwarding script - Create user groups with system users - Install python3-pymysql for Ansible - Strip old Gitea deployment methods - Bind MariaDB to docker0 for Docker access
23 lines
651 B
YAML
23 lines
651 B
YAML
- name: Install MariaDB
|
|
ansible.builtin.apt:
|
|
name: mariadb-server
|
|
state: present
|
|
|
|
- name: Regather facts for the potentially new docker0 interface
|
|
ansible.builtin.setup:
|
|
|
|
- name: Change the bind-address to allow from docker0
|
|
ansible.builtin.lineinfile:
|
|
path: /etc/mysql/mariadb.conf.d/50-server.cnf
|
|
regex: "^bind-address"
|
|
line: "bind-address = {{ ansible_facts.docker0.ipv4.address }}"
|
|
notify: restart_mariadb
|
|
|
|
- name: Allow database connections from Docker
|
|
community.general.ufw:
|
|
rule: allow
|
|
port: "3306"
|
|
proto: tcp
|
|
src: "{{ item }}"
|
|
loop: "{{ mariadb_trust | default(['172.16.0.0/12']) }}"
|