From 2393c4d792022ae770b51defb0d9cc48d80140e7 Mon Sep 17 00:00:00 2001 From: vincent Date: Mon, 15 Apr 2019 20:13:19 +0200 Subject: [PATCH] add clean of mysql folder when new install --- tasks/setup-Archlinux.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tasks/setup-Archlinux.yml b/tasks/setup-Archlinux.yml index e785290..9de0c0d 100644 --- a/tasks/setup-Archlinux.yml +++ b/tasks/setup-Archlinux.yml @@ -6,6 +6,10 @@ pacman: "name={{ mysql_packages }} state=present" register: arch_mysql_install_packages +- name: clean /var/lib/mysql if new instaled + file: path=/var/lib/mysql state=absent + when: arch_mysql_install_packages.changed + - name: Run mysql_install_db if MySQL packages were changed. command: mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql when: arch_mysql_install_packages.changed