From 688c625cc729300278b151e29eab220cd9f38b7d Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Sat, 25 Feb 2023 17:06:58 +0200
Subject: [PATCH] Add the new MR8300 WAP.

---
 Ansible/bootstrap.yaml                              | 1 +
 Ansible/hosts/all.yaml                              | 4 ++++
 Ansible/roles/router/files/dhcpd.conf               | 5 +++++
 Ansible/roles/router/files/hosts                    | 1 +
 Ansible/roles/router/files/unbound/shore.co.il.conf | 1 +
 Ansible/update.yaml                                 | 5 +++--
 Ansible/wap.yaml                                    | 1 +
 7 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/Ansible/bootstrap.yaml b/Ansible/bootstrap.yaml
index 3624722..53eb64b 100644
--- a/Ansible/bootstrap.yaml
+++ b/Ansible/bootstrap.yaml
@@ -13,6 +13,7 @@
 - name: Bootstrap OpenWRT hosts
   hosts:
     - ea6350
+    - mr8300
   tags:
     - openwrt
     - update
diff --git a/Ansible/hosts/all.yaml b/Ansible/hosts/all.yaml
index b8e14e2..9b3735a 100644
--- a/Ansible/hosts/all.yaml
+++ b/Ansible/hosts/all.yaml
@@ -12,6 +12,10 @@ all:
       # We already log in as root.
       ansible_become: false
       ansible_host: ea6350.shore.co.il
+    mr8300:
+      # We already log in as root.
+      ansible_become: false
+      ansible_host: mr8300.shore.co.il
     host01:
       ansible_host: host01.shore.co.il
     localhost:
diff --git a/Ansible/roles/router/files/dhcpd.conf b/Ansible/roles/router/files/dhcpd.conf
index 18e0064..8fb0599 100644
--- a/Ansible/roles/router/files/dhcpd.conf
+++ b/Ansible/roles/router/files/dhcpd.conf
@@ -27,4 +27,9 @@ subnet 192.168.3.0 netmask 255.255.255.0
     hardware ethernet 04:42:1a:ca:2c:87;
     fixed-address host01.shore.co.il;
   }
+  host mr8300
+  {
+    hardware ethernet C4:41:1E:AA:03:4A;
+    fixed-address mr8300.shore.co.il;
+  }
 }
diff --git a/Ansible/roles/router/files/hosts b/Ansible/roles/router/files/hosts
index fe35961..eeb1261 100644
--- a/Ansible/roles/router/files/hosts
+++ b/Ansible/roles/router/files/hosts
@@ -3,4 +3,5 @@
 192.168.3.1	ns1
 192.168.3.11 ea6350.shore.co.il ea6350
 192.168.3.12 xbmc.shore.co.il xbmc kodi.shore.co.il kodi
+192.168.3.13 mr8300.shore.co.il mr8300
 192.168.3.17 host01.shore.co.il host01
diff --git a/Ansible/roles/router/files/unbound/shore.co.il.conf b/Ansible/roles/router/files/unbound/shore.co.il.conf
index 6604d3c..6baab09 100644
--- a/Ansible/roles/router/files/unbound/shore.co.il.conf
+++ b/Ansible/roles/router/files/unbound/shore.co.il.conf
@@ -5,5 +5,6 @@ server:
     access-control: 127.0.0.0/8 allow
     local-data: "ea6350.shore.co.il.        A   192.168.3.11"
     local-data: "kodi.shore.co.il.          A   192.168.3.12"
+    local-data: "mr8300.shore.co.il.        A   192.168.3.13"
     local-data: "host01.shore.co.il.        A   192.168.3.17"
     local-data: "smtp.shore.co.il.          A   192.168.3.17"
diff --git a/Ansible/update.yaml b/Ansible/update.yaml
index e4d5aa8..7fde537 100644
--- a/Ansible/update.yaml
+++ b/Ansible/update.yaml
@@ -138,9 +138,10 @@
   tags:
     - reboot
 
-- name: Reboot EA6350
+- name: Reboot wireless access point
   hosts:
     - ea6350
+    - mr8300
   tasks:
     - name: Reboot
       when: reboot_needed|default(false)
@@ -153,7 +154,7 @@
 
 - name: Reboot the rest
   hosts:
-    - all:!ns1:!ea6350
+    - all:!ns1:!ea6350:!mr8300
   tasks:
     - name: Wait to re-establish the connection
       wait_for_connection:
diff --git a/Ansible/wap.yaml b/Ansible/wap.yaml
index a2b7bfa..5c1bddb 100644
--- a/Ansible/wap.yaml
+++ b/Ansible/wap.yaml
@@ -1,5 +1,6 @@
 ---
 - hosts:
     - ea6350
+    - mr8300
   roles:
     - wap
-- 
GitLab