From e5a00f23f0382b01d1acbb6b51e1e757075237fb Mon Sep 17 00:00:00 2001
From: Andrea Dell'Amico <adellam@isti.cnr.it>
Date: Thu, 20 Dec 2018 17:55:16 +0100
Subject: [PATCH] library/roles/mysql/tasks/configure_root_access.yml: Add some
tags and fix some descriptions.
---
mysql/tasks/configure_root_access.yml | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/mysql/tasks/configure_root_access.yml b/mysql/tasks/configure_root_access.yml
index bbbcab9..ec934ce 100644
--- a/mysql/tasks/configure_root_access.yml
+++ b/mysql/tasks/configure_root_access.yml
@@ -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