mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +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
|
enabled: yes
|
||||||
when: mysql_enabled | bool
|
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
|
# 'localhost' needs to be the last item for idempotency, see
|
||||||
# http://ansible.cc/docs/modules.html#mysql-user
|
# http://ansible.cc/docs/modules.html#mysql-user
|
||||||
# unfortunately it still doesn't work
|
# unfortunately it still doesn't work
|
||||||
|
@ -135,14 +143,6 @@
|
||||||
priv: "*.*:ALL,GRANT"
|
priv: "*.*:ALL,GRANT"
|
||||||
when: mysql_enabled | bool
|
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
|
- name: Update MySQL root password for all remaining root accounts (127.0.0.1, ::1) if mysql_enabled
|
||||||
mysql_user:
|
mysql_user:
|
||||||
name: root
|
name: root
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue