File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 2020 state : " {{ item.enabled | bool | ternary('started', 'stopped') }}"
2121 become : true
2222 loop : " {{ _libvirt_socket_services }}"
23+ when :
24+ - item.listen_address is not none
25+ - item.listen_address | length > 0
2326 loop_control :
2427 label : " {{ item.service }}"
2528 listen :
Original file line number Diff line number Diff line change 139139 name : " {{ item.service }}"
140140 state : " {{ item.enabled | bool | ternary('started', 'stopped') }}"
141141 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)
144146 loop_control :
145147 label : " {{ item.service }}"
146148 vars :
147149 _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 }}"
152150 - service : libvirtd
153151 enabled : true
You can’t perform that action at this time.
0 commit comments