forked from ISTI-ansible-roles/ansible-roles
library/roles/mysql/tasks/configure_root_access.yml: Add some tags and fix some descriptions.
This commit is contained in:
parent
cdffa72f6e
commit
e5a00f23f0
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
# 'localhost' needs to be the last item for idempotency, the mysql_user docs
|
||||
- name: Secure the mysql root user
|
||||
- name: Secure the mysql root user with a password
|
||||
mysql_user: name=root host={{ item }} password={{ mysql_root_password }}
|
||||
when: mysql_root_password is defined
|
||||
with_items:
|
||||
|
@ -9,9 +9,9 @@
|
|||
- ::1
|
||||
- localhost
|
||||
ignore_errors: True
|
||||
tags: mysql
|
||||
tags: [ 'mysql', 'mysql_root' ]
|
||||
|
||||
- name: Secure the mysql root user
|
||||
- name: Secure the mysql root user when no password has been defined
|
||||
mysql_user: name=root host={{ item }} password=""
|
||||
when: mysql_root_password is not defined
|
||||
with_items:
|
||||
|
@ -20,15 +20,16 @@
|
|||
- ::1
|
||||
- localhost
|
||||
ignore_errors: True
|
||||
tags: mysql
|
||||
tags: [ 'mysql', 'mysql_root' ]
|
||||
|
||||
- name: Install the .my.cnf file with root password credentials
|
||||
template: src=dot_my.cnf.j2 dest=/root/.my.cnf owner=root group=root mode=0400
|
||||
when: mysql_root_password is defined
|
||||
tags: mysql
|
||||
tags: [ 'mysql', 'mysql_root' ]
|
||||
|
||||
- name: delete anonymous MySQL server user for the server hostname
|
||||
mysql_user: user="" host="{{ ansible_hostname }}" state="absent"
|
||||
tags: [ 'mysql', 'mysql_root' ]
|
||||
tags: mysql
|
||||
|
||||
- name: delete anonymous MySQL server user for localhost
|
||||
|
|
Loading…
Reference in New Issue