File tree 2 files changed +7
-6
lines changed
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 20
20
state : " {{ item.enabled | bool | ternary('started', 'stopped') }}"
21
21
become : true
22
22
loop : " {{ _libvirt_socket_services }}"
23
+ when :
24
+ - item.listen_address is not none
25
+ - item.listen_address | length > 0
23
26
loop_control :
24
27
label : " {{ item.service }}"
25
28
listen :
Original file line number Diff line number Diff line change 139
139
name : " {{ item.service }}"
140
140
state : " {{ item.enabled | bool | ternary('started', 'stopped') }}"
141
141
enabled : " {{ item.enabled | bool }}"
142
- become : True
143
- loop : " {{ _libvirt_services }}"
142
+ become : true
143
+ loop : " {{ _libvirt_services + _libvirt_socket_services }}"
144
+ when : item.listen_address is not defined or
145
+ (item.listen_address is not none and item.listen_address | length > 0)
144
146
loop_control :
145
147
label : " {{ item.service }}"
146
148
vars :
147
149
_libvirt_services :
148
- - service : libvirtd-tcp.socket
149
- enabled : " {{ libvirt_host_tcp_listen | bool }}"
150
- - service : libvirtd-tls.socket
151
- enabled : " {{ libvirt_host_tls_listen | bool }}"
152
150
- service : libvirtd
153
151
enabled : true
You can’t perform that action at this time.
0 commit comments