From f173cb3be7661cb72ebde5a65bc6c556e93e9fff Mon Sep 17 00:00:00 2001 From: theonlydoo Date: Sun, 12 Oct 2014 15:01:10 +0200 Subject: [PATCH] database creation fixed --- roles/mail/templates/root-postfix.sql | 4 ++-- roles/mariadb/tasks/main.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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