From a98ee0dd0ba4a1b27feebe3ceb8bbb839d38e77d Mon Sep 17 00:00:00 2001 From: Emilien Mantel Date: Sun, 25 Sep 2016 15:18:02 +0200 Subject: [PATCH] Galera: bootstrap don't need systemd script helper --- tasks/galera/bootstrap.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tasks/galera/bootstrap.yml b/tasks/galera/bootstrap.yml index 7204f97..3354d22 100644 --- a/tasks/galera/bootstrap.yml +++ b/tasks/galera/bootstrap.yml @@ -1,6 +1,6 @@ --- - set_fact: - booboo: /var/lib/mysql/.ansible_galera_boostrap + booboo: "{{ mysql_datadir }}/.ansible_galera_boostrap" - name: STAT | Bootstrap mark stat: path={{ booboo }} @@ -8,12 +8,17 @@ - block: - - name: COMMAND | Stop MariaDB + - name: SERVICE | Stop MariaDB service: name=mysql state=stopped - - name: COMMAND | Bootstrap first node + - name: COMMAND | Bootstrap first node (systemd) command: galera_new_cluster + when: ansible_service_mgr == 'systemd' + + - name: COMMAND | Bootstrap first node (clean init) + command: '/etc/init.d/mysql bootstrap' register: bootstrap_run + when: ansible_service_mgr != 'systemd' when: not s.stat.exists