mirror of
https://github.com/aljazceru/ansible-role-mysql.git
synced 2025-12-20 09:14:22 +01:00
Merge pull request #130 from UnrealQuester/master
Fix role failing in check mode
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
command: mysql -NBe 'SELECT Host FROM mysql.user WHERE User = "root" ORDER BY (Host="localhost") ASC'
|
command: mysql -NBe 'SELECT Host FROM mysql.user WHERE User = "root" ORDER BY (Host="localhost") ASC'
|
||||||
register: mysql_root_hosts
|
register: mysql_root_hosts
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
always_run: true
|
||||||
|
|
||||||
# Note: We do not use mysql_user for this operation, as it doesn't always update
|
# Note: We do not use mysql_user for this operation, as it doesn't always update
|
||||||
# the root password correctly. See: https://goo.gl/MSOejW
|
# the root password correctly. See: https://goo.gl/MSOejW
|
||||||
@@ -32,6 +33,7 @@
|
|||||||
command: mysql -NBe 'SELECT Host FROM mysql.user WHERE User = ""'
|
command: mysql -NBe 'SELECT Host FROM mysql.user WHERE User = ""'
|
||||||
register: mysql_anonymous_hosts
|
register: mysql_anonymous_hosts
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
always_run: true
|
||||||
|
|
||||||
- name: Remove anonymous MySQL users.
|
- name: Remove anonymous MySQL users.
|
||||||
mysql_user:
|
mysql_user:
|
||||||
|
|||||||
Reference in New Issue
Block a user