Ensure daemon is reloaded on socket change
At the moment our verification if socket has been changed
is not valid, since we're checking if string 'true' is presnet in the
list, while list consist of only boolean variables. So we replace
map filter with selectattr as it can apply truthy test to the elements
while selecting them and checking list length.
Change-Id: Ib456b4dc2d631bf81633035820444f13ec0f06cb
Related-Bug: #2003631
(cherry picked from commit 6a40ec0b85
)
This commit is contained in:
parent
9aecc1b24d
commit
5c5813f88f
|
@ -140,7 +140,7 @@
|
|||
systemd:
|
||||
daemon_reload: yes
|
||||
when:
|
||||
- (systemd_services_result is changed) or (systemd_timer_result is changed) or (systemd_override_result is changed ) or ('true' in systemd_socket.results | map(attribute='changed') | list )
|
||||
- (systemd_services_result is changed) or (systemd_timer_result is changed) or (systemd_override_result is changed ) or (systemd_socket.results | selectattr('changed', 'true') | length > 0)
|
||||
|
||||
- include_tasks: systemd_load.yml
|
||||
loop: "{{ systemd_services }}"
|
||||
|
|
Loading…
Reference in New Issue