Browse Source

external mysql server

master
parent
commit
3da30ba7a8
3 changed files with 3 additions and 2 deletions
  1. +0
    -1
      defaults/main.yml
  2. +2
    -0
      tasks/main.yml
  3. +1
    -1
      templates/dbconfig.inc.php.j2

+ 0
- 1
defaults/main.yml View File

@@ -1,3 +1,2 @@
postfixadmin_mysql_database: postfixadmin postfixadmin_mysql_database: postfixadmin
postfixadmin_mysql_username: postfixadmin postfixadmin_mysql_username: postfixadmin
postfixadmin_mysql_password: eehahhoaQuai3oomochep7ca

+ 2
- 0
tasks/main.yml View File

@@ -4,6 +4,7 @@
mysql_db: mysql_db:
name: "{{postfixadmin_mysql_database}}" name: "{{postfixadmin_mysql_database}}"
state: present state: present
delegate_to: "{{postfixadmin_mysql_host}}"


- name: mysql user - name: mysql user
mysql_user: mysql_user:
@@ -11,6 +12,7 @@
password: "{{postfixadmin_mysql_password}}" password: "{{postfixadmin_mysql_password}}"
priv: "{{postfixadmin_mysql_database}}.*:ALL,GRANT" priv: "{{postfixadmin_mysql_database}}.*:ALL,GRANT"
state: present state: present
delegate_to: "{{postfixadmin_mysql_host}}"


- name: disable dbconfig - name: disable dbconfig
debconf: debconf:


+ 1
- 1
templates/dbconfig.inc.php.j2 View File

@@ -13,6 +13,6 @@ $dbuser='{{postfixadmin_mysql_username}}';
$dbpass='{{postfixadmin_mysql_password}}'; $dbpass='{{postfixadmin_mysql_password}}';
$basepath=''; $basepath='';
$dbname='{{postfixadmin_mysql_database}}'; $dbname='{{postfixadmin_mysql_database}}';
$dbserver='localhost';
$dbserver='{{postfixadmin_mysql_host}}';
$dbport='3306'; $dbport='3306';
$dbtype='mysqli'; $dbtype='mysqli';

Loading…
Cancel
Save