From 8c4ba8d5511c349a8a73582028abfcb6def2ba5a Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Thu, 21 Jan 2021 23:04:49 +0200
Subject: [PATCH] Router role updates.

- Use the newer Ansible 2.10 module names.
- Remove Nginx handler, Nginx was moved to host01.
- Use the newer Ansible 2.10 OpenBSD doas become module name.
---
 hosts/all.yaml                  | 2 +-
 roles/router/handlers/main.yaml | 5 -----
 roles/router/tasks/main.yaml    | 4 ++--
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/hosts/all.yaml b/hosts/all.yaml
index fc76f7d..1ed0550 100644
--- a/hosts/all.yaml
+++ b/hosts/all.yaml
@@ -3,7 +3,7 @@ all:
   hosts:
     ns1:
       ansible_host: ns1.shore.co.il
-      ansible_become_method: doas
+      ansible_become_method: community.general.doas
     ns4:
       ansible_host: ns4.shore.co.il
     kodi:
diff --git a/roles/router/handlers/main.yaml b/roles/router/handlers/main.yaml
index 7e6d466..cf1a557 100644
--- a/roles/router/handlers/main.yaml
+++ b/roles/router/handlers/main.yaml
@@ -41,11 +41,6 @@
     name: spamd
     state: restarted
 
-- name: Restart Nginx
-  service:
-    name: nginx
-    state: restarted
-
 - name: Restart the BGP daemon
   service:
     name: bgpd
diff --git a/roles/router/tasks/main.yaml b/roles/router/tasks/main.yaml
index a5f38f2..221bbd1 100644
--- a/roles/router/tasks/main.yaml
+++ b/roles/router/tasks/main.yaml
@@ -3,7 +3,7 @@
   ignore_errors: true
   with_dict:
     net.inet.ip.forwarding: "1"
-  sysctl:
+  ansible.posix.sysctl:
     name: '{{ item.key }}'
     value: '{{ item.value }}'
   tags:
@@ -167,7 +167,7 @@
     - curl
     - git
     - go
-  openbsd_pkg:
+  community.general.openbsd_pkg:
     name: '{{ item }}'
     state: present
   tags:
-- 
GitLab