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