1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-12 11:12:06 +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 daemon_reload: yes
state: restarted 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 - name: Remove the MySQL 'test' database
mysql_db: mysql_db:
db: test db: test
@ -122,31 +129,13 @@
user: "" user: ""
state: absent state: absent
- name: Install /root/.my.cnf file from template, with root password credentials - name: Create MySQL root password for root accounts on (127.0.0.1, ::1)
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)
mysql_user: mysql_user:
name: root name: root
host: "{{ item }}" host: "{{ item }}"
password: "{{ mysql_root_password }}" password: "{{ mysql_root_password }}"
priv: "*.*:ALL,GRANT" priv: "*.*:ALL,GRANT"
with_items: with_items:
#- "{{ iiab_hostname }}.{{ iiab_domain }}"
- 127.0.0.1 - 127.0.0.1
- ::1 - ::1

View file

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