Added roles

This commit is contained in:
vagrant
2025-11-18 13:18:52 +00:00
parent cbe9bfefa4
commit b40939e399
39 changed files with 568 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#SPDX-License-Identifier: MIT-0
---
# tasks file for mysql
- name: install tools
apt: name={{item}} state=present update_cache=yes
with_items:
- python3-mysqldb
- name: install mysql-server
apt: name=mysql-server state=present update_cache=yes
- name: chmod cnf
command: chmod 777 /etc/mysql/my.cnf
- name: ensure mysql listening on all ports
lineinfile: dest=/etc/mysql/my.cnf regexp=^bind-address line="bind-address = 0.0.0.0"
notify: restart mysql
- name: ensure mysql started
service: name=mysql state=started enabled=yes
- name: create demo database
mysql_db: name=demo state=present
- name: create demo user
mysql_user: name=demo password=demo priv=demo.*:ALL host='%' state=present