From 84ca7df0e260c8bd38db111bb61bcf941fc3e4d6 Mon Sep 17 00:00:00 2001 From: eoli3n Date: Fri, 15 May 2020 13:11:12 +0200 Subject: [PATCH] updated mako role to test if it is running --- roles/mako/handlers/main.yml | 2 +- roles/mako/tasks/main.yml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/mako/handlers/main.yml b/roles/mako/handlers/main.yml index e407f92..04bb26b 100644 --- a/roles/mako/handlers/main.yml +++ b/roles/mako/handlers/main.yml @@ -2,4 +2,4 @@ - name: reload mako shell: makoctl reload - when: ansible_virtualization_role == "host" + when: ansible_virtualization_role == "host" and mako_running is succeeded diff --git a/roles/mako/tasks/main.yml b/roles/mako/tasks/main.yml index 886d08f..a5ef40e 100644 --- a/roles/mako/tasks/main.yml +++ b/roles/mako/tasks/main.yml @@ -5,6 +5,10 @@ path: ~/.config/mako/ state: directory +- shell: pgrep mako + register: mako_running + ignore_errors: True + - name: template mako config file template: src: config.j2