From 4dd0ce9f2cf812f280eb7dcafdf5ce9d0a583b59 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Mon, 31 Jan 2022 09:01:18 -0500 Subject: [PATCH] ensure /etc/yum.repos.d/securityonion.repo is absent if not a manager and managerupdates is enabled --- salt/repo/client/init.sls | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/salt/repo/client/init.sls b/salt/repo/client/init.sls index 081fef762..160782267 100644 --- a/salt/repo/client/init.sls +++ b/salt/repo/client/init.sls @@ -53,6 +53,12 @@ remove_securityonionrepocache: - name: /etc/yum.repos.d/securityonioncache.repo {% endif %} + {% if role not in ['eval', 'standalone', 'import', 'manager', 'managersearch'] and managerupdates == 1 %} +remove_securityonionrepo: + file.absent: + - name: /etc/yum.repos.d/securityonion.repo + {% endif %} + crsecurityonionrepo: file.managed: {% if role in ['eval', 'standalone', 'import', 'manager', 'managersearch'] or managerupdates == 0 %}