From 40f2a09c8f6fdf1f10121425a5ce3bc6995e389a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Wed, 10 Apr 2019 14:22:54 +0200 Subject: [PATCH] Remove apps symlinks for absent deploy_state --- tasks/main.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 5fb9896..e71ba84 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -91,7 +91,7 @@ - name: Fix libssl error RAC1170 file: src: "/usr/lib/x86_64-linux-gnu/libssl.so.1.0.2" - dest: "/opt/dell/srvadmin/lib64/libssl.so" + path: "/opt/dell/srvadmin/lib64/libssl.so" state: link when: (openmanage__deploy_state == "present") @@ -100,11 +100,23 @@ file: src: "/opt/dell/srvadmin/sbin/{{ item }}" path: "/bin/{{ item }}" - state: '{{ "link" if (openmanage__deploy_state == "present") - else "absent" }}' + state: "link" with_items: - 'omconfig' - 'omexec' - 'omreport' - 'omupdate' - 'racadm' + when: (openmanage__deploy_state == "present") + +- name: Remove Executables symlinks + file: + path: "/bin/{{ item }}" + state: "absent" + with_items: + - 'omconfig' + - 'omexec' + - 'omreport' + - 'omupdate' + - 'racadm' + when: (openmanage__deploy_state == "absent")