From f9414ff0cbdf205257d39dd581df10169ecfa1ab Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Fri, 21 Sep 2018 14:34:36 +0100 Subject: [PATCH] Delegate the database schema import to monasca_db_setup_host In order to remove the requirement to install the MariaDB client libraries on all monasca hosts, we need to isolate all DB actions on monasca_db_setup_host which has those libraries. Change-Id: I269a933a7e26a3f4564d18d6f05cfce4b4eafe27 --- handlers/main.yml | 1 + tasks/monasca_mysql_setup.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/handlers/main.yml b/handlers/main.yml index cf199ca..201b960 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -34,6 +34,7 @@ name: "{{ monasca_galera_database }}" state: import target: "/opt/mon_mysql.sql" + delegate_to: "{{ monasca_db_setup_host }}" no_log: True - name: Restart monasca services diff --git a/tasks/monasca_mysql_setup.yml b/tasks/monasca_mysql_setup.yml index 24b8c29..d6901fd 100644 --- a/tasks/monasca_mysql_setup.yml +++ b/tasks/monasca_mysql_setup.yml @@ -44,4 +44,5 @@ group: root mode: 0640 src: mon_mysql.sql.j2 + delegate_to: "{{ monasca_db_setup_host }}" notify: Create monasca database schema