Try to fix .my.cnf
This commit is contained in:
parent
321779dafd
commit
88d7a964b9
1 changed files with 8 additions and 3 deletions
|
@ -12,7 +12,7 @@
|
||||||
- name: Set ~/.my.cnf file
|
- name: Set ~/.my.cnf file
|
||||||
template: src=files/mysql_secure-installation-my.conf.j2 dest=/root/.my.cnf mode=0600
|
template: src=files/mysql_secure-installation-my.conf.j2 dest=/root/.my.cnf mode=0600
|
||||||
vars:
|
vars:
|
||||||
MYSQL_ROOT_PASSWORD: "{{mysql_root_password}}"
|
MYSQL_ROOT_PASSWORD: '""'
|
||||||
|
|
||||||
- name: Update MariaDB root password
|
- name: Update MariaDB root password
|
||||||
mysql_user: name=root host={{item}} password={{mysql_root_password}}
|
mysql_user: name=root host={{item}} password={{mysql_root_password}}
|
||||||
|
@ -21,6 +21,11 @@
|
||||||
- ::1
|
- ::1
|
||||||
- localhost
|
- localhost
|
||||||
|
|
||||||
|
- name: Update ~/.my.cnf file
|
||||||
|
template: src=files/mysql_secure-installation-my.conf.j2 dest=/root/.my.cnf mode=0600
|
||||||
|
vars:
|
||||||
|
MYSQL_ROOT_PASSWORD: "{{mysql_root_password}}"
|
||||||
|
|
||||||
- name: Delete anonymous MySQL user
|
- name: Delete anonymous MySQL user
|
||||||
mysql_user: name="" host={{item}} state=absent
|
mysql_user: name="" host={{item}} state=absent
|
||||||
with_items:
|
with_items:
|
||||||
|
|
Loading…
Reference in a new issue