mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
supply my.cnf file before accessing DBs
This commit is contained in:
parent
e3d0d454c0
commit
d68644be72
1 changed files with 8 additions and 8 deletions
|
@ -124,6 +124,14 @@
|
|||
enabled: yes
|
||||
when: mysql_enabled | bool
|
||||
|
||||
- name: Install .my.cnf file from template, with root password credentials, if mysql_enabled
|
||||
template:
|
||||
src: my.cnf.j2
|
||||
dest: /root/.my.cnf
|
||||
owner: root
|
||||
mode: 0600
|
||||
when: mysql_enabled | bool
|
||||
|
||||
# 'localhost' needs to be the last item for idempotency, see
|
||||
# http://ansible.cc/docs/modules.html#mysql-user
|
||||
# unfortunately it still doesn't work
|
||||
|
@ -135,14 +143,6 @@
|
|||
priv: "*.*:ALL,GRANT"
|
||||
when: mysql_enabled | bool
|
||||
|
||||
- name: Install .my.cnf file from template, with root password credentials, if mysql_enabled
|
||||
template:
|
||||
src: my.cnf.j2
|
||||
dest: /root/.my.cnf
|
||||
owner: root
|
||||
mode: 0600
|
||||
when: mysql_enabled | bool
|
||||
|
||||
- name: Update MySQL root password for all remaining root accounts (127.0.0.1, ::1) if mysql_enabled
|
||||
mysql_user:
|
||||
name: root
|
||||
|
|
Loading…
Reference in a new issue