|
@@ -25,7 +25,7 @@
|
|
|
|
|
|
- name: Change MySQL or MariaDB root default password
|
|
|
raw: if ! echo "SELECT VERSION();" | mysql -u root --password='{{ mysql_root_password }}' >/dev/null 2>&1 ; then echo "UPDATE mysql.user SET Password=PASSWORD('{{ mysql_root_password }}') WHERE User IN ('', 'root'); FLUSH PRIVILEGES;" | mysql --defaults-file=/etc/mysql/debian.cnf ; fi
|
|
|
- when: mysql_root_password
|
|
|
+ when: mysql_root_password != ''
|
|
|
|
|
|
- name: Ensure MySQL or MariaDB is running
|
|
|
service: name=mysql state=started
|