From 726251cd940b46d932f0e4e3b1939d70a375f82e Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Mon, 18 Nov 2019 16:02:48 -0500 Subject: [PATCH] changes to patch motd so nodes can be removed after they restarted - https://github.com/Security-Onion-Solutions/securityonion-saltstack/issues/112 --- salt/patch/needs_restarting.sls | 4 ++++ salt/patch/os/init.sls | 9 +++------ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 salt/patch/needs_restarting.sls diff --git a/salt/patch/needs_restarting.sls b/salt/patch/needs_restarting.sls new file mode 100644 index 000000000..f7ba2626d --- /dev/null +++ b/salt/patch/needs_restarting.sls @@ -0,0 +1,4 @@ +needs_restarting: + module.run: + - mine.send: + - func: needs_restarting.check diff --git a/salt/patch/os/init.sls b/salt/patch/os/init.sls index 97183199b..a29bf8d12 100644 --- a/salt/patch/os/init.sls +++ b/salt/patch/os/init.sls @@ -1,5 +1,6 @@ -{% if grains.os == "CentOS" %} include: + - patch.needs_restarting +{% if grains.os == "CentOS" %} - yum.packages {% endif %} @@ -7,8 +8,4 @@ patch_os: pkg.uptodate: - name: patch_os - refresh: True - -needs_restarting: - module.run: - - mine.send: - - func: needs_restarting.check + - onchanges_in: needs_restarting