From 56201092b6b232b585942f891f7b94546b69290b Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Sat, 23 Apr 2022 13:34:58 +0300
Subject: [PATCH] Router playbook: Send email with rogue services.

New in OpenBSD 7.1, list services that are running but shouldn't (are
disabled). Send the list as part of the daily email.
---
 Ansible/roles/router/tasks/main.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Ansible/roles/router/tasks/main.yaml b/Ansible/roles/router/tasks/main.yaml
index 255ba18..a7feaf5 100644
--- a/Ansible/roles/router/tasks/main.yaml
+++ b/Ansible/roles/router/tasks/main.yaml
@@ -492,11 +492,14 @@
 # yamllint disable-line rule:line-length
 - name: Configure the daily Cron job (skip email if there's nothing to report, report on pending system patches).
   ansible.builtin.copy:
+    # yamllint disable rule:line-length
     content: |
       VERBOSESTATUS=0
       syspatch -c
       pkg_add -uInx | grep -v '^quirks'
       fw_update -an | grep -v '^quirks'
+      {{ "rcctl ls rogue" if ansible_distribution_version is version('7.1', '>=') }}
+    # yamllint enable rule:line-length
     dest: /etc/daily.local
     group: wheel
     mode: 0o0444
-- 
GitLab