Remove apps symlinks for absent deploy_state

This commit is contained in:
Jeremy Gardais 2019-04-10 14:22:54 +02:00
parent 4f8c94a131
commit 40f2a09c8f
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 15 additions and 3 deletions

View File

@ -91,7 +91,7 @@
- name: Fix libssl error RAC1170 - name: Fix libssl error RAC1170
file: file:
src: "/usr/lib/x86_64-linux-gnu/libssl.so.1.0.2" 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 state: link
when: (openmanage__deploy_state == "present") when: (openmanage__deploy_state == "present")
@ -100,11 +100,23 @@
file: file:
src: "/opt/dell/srvadmin/sbin/{{ item }}" src: "/opt/dell/srvadmin/sbin/{{ item }}"
path: "/bin/{{ item }}" path: "/bin/{{ item }}"
state: '{{ "link" if (openmanage__deploy_state == "present") state: "link"
else "absent" }}'
with_items: with_items:
- 'omconfig' - 'omconfig'
- 'omexec' - 'omexec'
- 'omreport' - 'omreport'
- 'omupdate' - 'omupdate'
- 'racadm' - '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")