From 7c793b18a414286aac78f9a4a07cf71e38b4b596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iwan=20Cl=C3=A9ment?= Date: Sun, 25 Feb 2018 17:18:55 +0000 Subject: [PATCH] Ajouter 'linux/MinionUpgrade.sls' --- linux/MinionUpgrade.sls | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 linux/MinionUpgrade.sls diff --git a/linux/MinionUpgrade.sls b/linux/MinionUpgrade.sls new file mode 100644 index 0000000..b3bc65e --- /dev/null +++ b/linux/MinionUpgrade.sls @@ -0,0 +1,12 @@ +Restart Salt Minion: + cmd.run: +{%- if grains['kernel'] == 'Windows' %} + - name: 'start powershell "Restart-Service -Name salt-minion"' +{%- else %} + # fork and disown the process + - name: |- + exec 0>&- # close stdin + exec 1>&- # close stdout + exec 2>&- # close stderr + nohup salt-call --local service.restart salt-minion & +{%- endif %} \ No newline at end of file