From f92947b2dfa950f3a4a3d5603d07e35193cd3257 Mon Sep 17 00:00:00 2001
From: Andrea Dell'Amico <andrea.dellamico@isti.cnr.it>
Date: Fri, 6 Oct 2023 18:29:12 +0200
Subject: [PATCH] Run the handler after the interface configuration.

---
 handlers/main.yml            | 2 +-
 tasks/network-interfaces.yml | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/handlers/main.yml b/handlers/main.yml
index c2b5383..f4d0806 100644
--- a/handlers/main.yml
+++ b/handlers/main.yml
@@ -1,4 +1,4 @@
 ---
 - name: Netplan Apply
   ansible.builtin.command:
-    cmd: netplan Apply
+    cmd: netplan apply
diff --git a/tasks/network-interfaces.yml b/tasks/network-interfaces.yml
index 68caaed..21ee61a 100644
--- a/tasks/network-interfaces.yml
+++ b/tasks/network-interfaces.yml
@@ -31,3 +31,9 @@
         mode: "0644"
       when: net_ints is defined and net_ints | length != 0
       notify: Netplan Apply
+
+- meta: flush_handlers
+  tags:
+    - network_interface
+    - networking
+