From 31ff0dea77b7558d26ecdb38ab008af7a9d7f8f3 Mon Sep 17 00:00:00 2001 From: theonlydoo Date: Sun, 12 Oct 2014 14:57:47 +0200 Subject: [PATCH] remote host mysql + typo import db --- etc/host_vars/localhost.example | 1 + roles/mail/tasks/main.yml | 2 +- roles/mail/templates/root-.my.cnf | 1 + roles/mariadb/templates/root-.my.cnf | 5 ++--- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/etc/host_vars/localhost.example b/etc/host_vars/localhost.example index 124b00f..acf40e6 100644 --- a/etc/host_vars/localhost.example +++ b/etc/host_vars/localhost.example @@ -8,4 +8,5 @@ disable_ipv6: true domain: test.net mariadb_version: 10.0 mysql_root_password: changeme +mysql_host: localhost # vim: set textwidth=0 ft=yaml: diff --git a/roles/mail/tasks/main.yml b/roles/mail/tasks/main.yml index e1117f8..75446d7 100644 --- a/roles/mail/tasks/main.yml +++ b/roles/mail/tasks/main.yml @@ -96,7 +96,7 @@ template: src=root-postfix.sql dest=/etc/postfix/ owner=root mode=655 - name: Create database for postfix - shell: mysql < /etc/postfix/postfix.sql + shell: mysql < /etc/postfix/root-postfix.sql - name: Config amavis copy: src=etc-amavis-conf.d-15-content_filter_mode dest=/etc/amavis/conf.d/15-content_filter_mode diff --git a/roles/mail/templates/root-.my.cnf b/roles/mail/templates/root-.my.cnf index 97621e8..0cc3818 100644 --- a/roles/mail/templates/root-.my.cnf +++ b/roles/mail/templates/root-.my.cnf @@ -1,4 +1,5 @@ [client] +host = {{ mysql_host }} user = root password = {{ rootpassword }} diff --git a/roles/mariadb/templates/root-.my.cnf b/roles/mariadb/templates/root-.my.cnf index 07a51c0..ac1cbfe 100644 --- a/roles/mariadb/templates/root-.my.cnf +++ b/roles/mariadb/templates/root-.my.cnf @@ -1,6 +1,5 @@ -# aaaaaaaaaaaaaa - -[client] +[client] +host = {{ mysql_host }} user = root password = {{ rootpassword }}