This commit is contained in:
2026-05-19 16:17:27 +02:00
parent 16266c1a18
commit 613e6be0f8
44 changed files with 1244 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
---
- name: install tools
apt: name={{item}} state=present update_cache=yes
with_items:
- python3-mysqldb
- name: install mysql-server
apt: name=mysql-server-8.0 state=present update_cache=yes
- name: ensure mysql started properly
service: name=mysql state=started enabled=yes
register: mysql_status
until: mysql_status is success
retries: 5
delay: 5
- name: read mysql_status
debug: var=mysql_status
- name: ensure mysql listening on all ports
lineinfile:
dest: /etc/mysql/my.cnf
regexp: '^\[mysqld\]'
line: "[mysqld]\nbind-address = 0.0.0.0"
notify: restart mysql
- 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