testing
This commit is contained in:
16
roles/webserver/tasks/debian.yml
Normal file
16
roles/webserver/tasks/debian.yml
Normal 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
|
||||
@@ -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
|
||||
|
||||
16
roles/webserver/tasks/rocky.yml
Normal file
16
roles/webserver/tasks/rocky.yml
Normal 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
|
||||
Reference in New Issue
Block a user