1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-12 19:22:24 +00:00

keep root websockets using password

This commit is contained in:
Jerry Vonau 2020-08-23 12:25:11 -05:00
parent dc41fb4bf7
commit 4019a5e689
2 changed files with 11 additions and 22 deletions

View file

@ -106,6 +106,13 @@
daemon_reload: yes
state: restarted
- name: Install /root/.my.cnf file from template, with root password credentials
template:
src: my.cnf.j2
dest: /root/.my.cnf
owner: root
mode: '0600'
- name: Remove the MySQL 'test' database
mysql_db:
db: test
@ -122,31 +129,13 @@
user: ""
state: absent
- name: Install /root/.my.cnf file from template, with root password credentials
template:
src: my.cnf.j2
dest: /root/.my.cnf
owner: root
mode: '0600'
# 'localhost' needs to be the last item for idempotency, see
# http://ansible.cc/docs/modules.html#mysql-user
# unfortunately it still doesn't work
- name: Update MySQL root password for localhost root accounts
mysql_user:
name: root
host: localhost
password: "{{ mysql_root_password }}"
priv: "*.*:ALL,GRANT"
- name: Update MySQL root password for all remaining root accounts (127.0.0.1, ::1)
- name: Create MySQL root password for root accounts on (127.0.0.1, ::1)
mysql_user:
name: root
host: "{{ item }}"
password: "{{ mysql_root_password }}"
priv: "*.*:ALL,GRANT"
with_items:
#- "{{ iiab_hostname }}.{{ iiab_domain }}"
- 127.0.0.1
- ::1

View file

@ -1,4 +1,4 @@
[client]
user=root
password={{ mysql_root_password }}
socket=/run/mysqld/mysqld.sock
user = root
password =
socket = /run/mysqld/mysqld.sock