From 218fc61506dc084988b06d1ffd09a10a86168b0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <Joerg.Sachse@slub-dresden.de> Date: Fri, 7 Jan 2022 11:53:27 +0100 Subject: [PATCH] feat: only run NFS tasks if Rosetta is stopped --- tasks/main.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 63ced46..93bdbb1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -20,8 +20,17 @@ tags: [users] - import_tasks: "configure_sanitytest.yml" tags: [users, sanitytest] -- import_tasks: configure_nfs_mounts.yml + +- name: find out if Rosetta is running, to make sure NFS tasks are only executed if Rosetta is OFF + shell: 'ps -ef | grep -v "grep" | grep "DAPP_ROLE"' + register: rosetta_status + failed_when: false + tags: [mount, nfs] +- import_tasks: "configure_nfs_mounts.yml" + # when: ansible_facts.services['exlibris'].state != "running" + when: rosetta_status.rc != 0 tags: [mount, nfs] + - import_tasks: install_checkmk_plugins.yml tags: [checkmk, monitoring] - import_tasks: configure_iptables.yml -- GitLab