From 98f016d2a6bc94a0054e6cdff6d90c2ff751094d Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Wed, 27 Jan 2021 22:12:05 +0200
Subject: [PATCH] Stop or start enabled or disabled services.

---
 roles/router/tasks/main.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/roles/router/tasks/main.yaml b/roles/router/tasks/main.yaml
index 221bbd1..e21666a 100644
--- a/roles/router/tasks/main.yaml
+++ b/roles/router/tasks/main.yaml
@@ -129,6 +129,7 @@
   service:
     enabled: true
     name: unbound
+    state: started
   tags:
     - unbound
     - dns
@@ -151,6 +152,7 @@
   service:
     enabled: true
     name: ftpproxy
+    state: started
   notify: Restart the FTP proxy
   tags:
     - ftpproxy
@@ -266,6 +268,7 @@
   service:
     enabled: true
     name: nsd
+    state: started
   tags:
     - nsd
     - dns
@@ -288,6 +291,7 @@
   service:
     enabled: true
     name: dhcpd
+    state: started
   notify:
     - Restart the DHCP daemon
   tags:
@@ -364,6 +368,7 @@
   service:
     enabled: true
     name: bgpd
+    state: started
   notify:
     - Restart the BGP daemon
   tags:
@@ -391,6 +396,7 @@
   service:
     enabled: true
     name: ntpd
+    state: started
   notify:
     - Restart the NTP daemon
   tags:
@@ -431,6 +437,7 @@
   service:
     enabled: false
     name: sndiod
+    state: stopped
   notify:
     - Stop the audio server
   tags:
-- 
GitLab