Only write floating ip config when floating_ips are set

The task also ran with an empty list and restarted/enabled ifupdown's networking service; Raspberry Pi OS (NetworkManager) has no /etc/network/interfaces.d at all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
lhahnandClaude Opus 5.5 committed 2026-10-16 13:57:49 +02:00
1 parent a6f015fd68
commit 69dc1b137a
1 file changed
+2
+2
View File
@@ -7,3 +7,5 @@
group: root group: root
mode: 0644 mode: 0644
notify: restart networking service notify: restart networking service
# only ifupdown hosts with floating ips need this (not e.g. Raspberry Pi OS with NetworkManager)
when: floating_ips | length > 0