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