1
0
Fork 0
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:
Jerry Vonau 2019-10-31 09:48:39 -05:00
parent e3d0d454c0
commit d68644be72

View file

@ -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