From 5b298058659a8ab690c8f5760a6c6d3dd9c6ac05 Mon Sep 17 00:00:00 2001 From: LinuxSquare Date: Sun, 1 Dec 2024 18:26:18 +0100 Subject: [PATCH] fix .my.cnf somehow --- mysql/pkg.ansible.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mysql/pkg.ansible.yml b/mysql/pkg.ansible.yml index d061372..896a161 100644 --- a/mysql/pkg.ansible.yml +++ b/mysql/pkg.ansible.yml @@ -14,13 +14,12 @@ - 127.0.0.1 - ::1 - localhost + - name: Set ~/.my.cnf file - template: - - src: files/mysql_secure-installation-my.conf.j2 - - dest: /root/.my.cnf - - mode: '0600' + template: src=files/mysql_secure-installation-my.conf.j2 dest=/root/.my.cnf mode=0600 vars: MYSQL_ROOT_PASSWORD: "{{mysql_root_password}}" + - name: Delete anonymous MySQL user mysql_user: name="" host={{item}} state=absent with_items: