mirror of
https://github.com/HanXHX/ansible-mysql.git
synced 2026-03-18 12:02:10 +07:00
first commit
This commit is contained in:
21
tasks/secure.yml
Normal file
21
tasks/secure.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
|
||||
- name: MYSQL_USER | Update mysql root password for all root accounts
|
||||
mysql_user: name=root host={{ item }} password={{ mysql_root_password }}
|
||||
with_items:
|
||||
- "{{ ansible_hostname }}"
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
- localhost
|
||||
|
||||
- name: MYSQL_USER | Remove all anonymous users
|
||||
mysql_user: name='' host={{ item }} state=absent
|
||||
with_items:
|
||||
- "{{ ansible_hostname }}"
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
- localhost
|
||||
|
||||
- name: MYSQL_DB | Remove the test database
|
||||
mysql_db: name=test state=absent
|
||||
|
||||
Reference in New Issue
Block a user