diff --git a/roles/mail/templates/root-postfix.sql b/roles/mail/templates/root-postfix.sql index 5ef5a54..00c8c91 100644 --- a/roles/mail/templates/root-postfix.sql +++ b/roles/mail/templates/root-postfix.sql @@ -1,4 +1,4 @@ CREATE DATABASE postfix; -GRANT ALL PRIVILEGES ON postfix.* TO 'postfix_admin'@'%' IDENTIFIED BY '{{ dbpassword }}'; -GRANT SELECT ON postfix.* TO 'postfix'@'%' IDENTIFIED BY '{{ dbpassword }}'; +GRANT ALL PRIVILEGES ON postfix.* TO 'postfix_admin'@'%' IDENTIFIED BY '{{ dbpassword.stdout }}'; +GRANT SELECT ON postfix.* TO 'postfix'@'%' IDENTIFIED BY '{{ dbpassword.stdout }}'; FLUSH PRIVILEGES; diff --git a/roles/mariadb/tasks/main.yml b/roles/mariadb/tasks/main.yml index 7d18eac..1c70a97 100644 --- a/roles/mariadb/tasks/main.yml +++ b/roles/mariadb/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: MySQL already installed ? - shell: dpkg -l|grep mysql|grep -iq serv + shell: dpkg -l|egrep "mysql|mariadb"|grep -iq serv ignore_errors: true register: mysql