Revert 4a51da3
Cause if a service is started|stopped manually, it can't come back in the desired state.
This commit is contained in:
parent
bff4d7a11f
commit
d498ca502a
|
@ -3,7 +3,7 @@
|
|||
- name: restart flexlm services
|
||||
service:
|
||||
name: '{{ "flexlm-" + item.name }}'
|
||||
state: '{{ "restarted" if (flexlm__deploy_state == "present" and (item.service | d(True)) else "stopped" }}'
|
||||
state: '{{ "restarted" if (flexlm__deploy_state == "present" and (item.service | d(True) | bool) else "stopped" }}'
|
||||
enabled: '{{ item.service | d(True) | bool }}'
|
||||
with_flattened:
|
||||
- '{{ flexlm__licences }}'
|
||||
|
|
|
@ -99,3 +99,11 @@
|
|||
notify: ['restart flexlm services']
|
||||
when: ( flexlm__register_service|changed )
|
||||
|
||||
- name: Manage flexlm services
|
||||
service:
|
||||
name: '{{ "flexlm-" + item.name }}'
|
||||
state: '{{ "started" if (flexlm__deploy_state == "present" and (item.service | d(True) | bool)) else "stopped" }}'
|
||||
enabled: '{{ item.service | d(True) | bool }}'
|
||||
with_flattened:
|
||||
- '{{ flexlm__licences }}'
|
||||
|
||||
|
|
Loading…
Reference in New Issue