diff --git a/mysql/pkg.ansible.yml b/mysql/pkg.ansible.yml index d362131..9c7657d 100644 --- a/mysql/pkg.ansible.yml +++ b/mysql/pkg.ansible.yml @@ -7,3 +7,22 @@ - mariadb - mariadb-client - mariadb-openrc + - name: Update MariaDB root password + mysql_user: name=root host={{item}} password={{mysql_root_password}} + with_items: + - 127.0.0.1 + - ::1 + - localhost + - name: Delete anonymous MySQL user + mysql_user: name="" host={{item}} state=absent + with_items: + - localhost + - "{{ansible_nodename}}" + - name: Delete Hostname based MySQL user + mysql_user: name=root host="{{ansible_nodename}}" state=absent + - name: Remove MySQL test database + mysql_db: + name: test + state: absent + + \ No newline at end of file