Rework mysql role
This commit is contained in:
parent
9488b4541e
commit
4e90230c43
@ -3,25 +3,23 @@
|
||||
---
|
||||
- name: Set up MySQL
|
||||
block:
|
||||
- name: Install MySQL
|
||||
apt:
|
||||
name: "{{ packages }}"
|
||||
vars:
|
||||
packages:
|
||||
- mariadb-server
|
||||
- python3-mysqldb
|
||||
- name: Start MySQL
|
||||
service:
|
||||
name: mysql
|
||||
state: started
|
||||
enabled: true
|
||||
- name: Update root password
|
||||
mysql_user:
|
||||
name: root
|
||||
host: localhost
|
||||
password: "{{ mysql_root_password }}"
|
||||
login_user: root
|
||||
login_password: "{{ mysql_root_password }}"
|
||||
check_implicit_admin: yes
|
||||
priv: "*.*:ALL,GRANT"
|
||||
become: true
|
||||
- name: Install MySQL
|
||||
apt:
|
||||
name:
|
||||
- mariadb-server
|
||||
- python3-mysqldb
|
||||
- name: Start MySQL
|
||||
systemd:
|
||||
name: mysql
|
||||
enabled: yes
|
||||
state: started
|
||||
- name: Update root password
|
||||
mysql_user:
|
||||
name: root
|
||||
host: localhost
|
||||
password: "{{ mysql_root_password }}"
|
||||
login_user: root
|
||||
login_password: "{{ mysql_root_password }}"
|
||||
check_implicit_admin: yes
|
||||
priv: "*.*:ALL,GRANT"
|
||||
become: yes
|
||||
|
Loading…
Reference in New Issue
Block a user