Don't purge unit file

Otherwise the service can't be stopped.
This commit is contained in:
Jeremy Gardais 2018-02-28 11:01:06 +01:00
parent d498ca502a
commit 2913b41c13
2 changed files with 1 additions and 11 deletions

View File

@ -9,7 +9,7 @@
### Enhancements ### Enhancements
* Set a var to manage the state of the deployment by this role. * Set a var to manage the state of the deployment by this role.
* Ensure to remove service management if deploy state is "absent". * Ensure to stop and disable services if deploy state is "absent".
## v1.0 ## v1.0

View File

@ -84,16 +84,6 @@
when: ( (flexlm__deploy_state == "present") and when: ( (flexlm__deploy_state == "present") and
( item.service | d(True) )) ( item.service | d(True) ))
- name: Purge systemd unit
file:
dest: '{{ "/etc/systemd/system/flexlm-" + item.name + ".service" }}'
state: absent
register: flexlm__register_service
with_flattened:
- '{{ flexlm__licences }}'
when: ( (flexlm__deploy_state == "absent") or
not ( item.service | d(True) | bool ))
- name: Reload systemd daemons - name: Reload systemd daemons
command: systemctl daemon-reload command: systemctl daemon-reload
notify: ['restart flexlm services'] notify: ['restart flexlm services']