From 1ba51b858320c52a7f225fa4219cbf40bc76303b Mon Sep 17 00:00:00 2001 From: N Date: Tue, 5 Jun 2018 15:15:04 +0100 Subject: [PATCH] notify nosupport if SLES version < 15 --- firewalld/init.sls | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/firewalld/init.sls b/firewalld/init.sls index a3bc80c..f410bd5 100644 --- a/firewalld/init.sls +++ b/firewalld/init.sls @@ -5,7 +5,16 @@ # {% from "firewalld/map.jinja" import firewalld with context %} -{% if salt['pillar.get']('firewalld:enabled') %} +{% if salt['grains.get']('osfullname') == "SLES" and salt['grains.get']('osmajorrelease')|int < 15 %} + +firewalld-unsupported: + test.show_notification: + - text: | + Firewalld is not supported on {{ grains['osfinger'] }} + See https://www.suse.com/releasenotes/x86_64/SUSE-SLES/15/#fate-323460 + +{% elif salt['pillar.get']('firewalld:enabled') %} + include: - firewalld.config - firewalld.ipsets @@ -43,8 +52,10 @@ reload_firewalld: - service: service_firewalld {% else %} + service_firewalld: service.dead: - name: {{ firewalld.service }} - enable: False # don't start on boot + {% endif %}