From a36f2eb2d2ab4e3d57885177f3438037b15318e3 Mon Sep 17 00:00:00 2001 From: noelmcloughlin Date: Fri, 11 Sep 2020 20:53:00 +0100 Subject: [PATCH] fix(windows): dont run master state --- salt/init.sls | 2 +- salt/master.sls | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/salt/init.sls b/salt/init.sls index e0eecb1..bc1a5d6 100755 --- a/salt/init.sls +++ b/salt/init.sls @@ -6,7 +6,7 @@ include: {%- if salt.config.get('salt_formulas:list') %} - salt.formulas {%- endif %} - {%- if salt.config.get('salt:master')|length > 1 %} + {%- if salt.config.get('salt:master')|length > 1 and grains.kernel != 'Windows' %} - salt.master {%- endif %} {%- if salt.config.get('salt:cloud')|length > 1 %} diff --git a/salt/master.sls b/salt/master.sls index 10d5bb3..3a6835d 100644 --- a/salt/master.sls +++ b/salt/master.sls @@ -7,6 +7,8 @@ include: - .pin {% endif %} +{%- if grains.kernel != 'Windows' %} + {%- if grains.os == 'MacOS' %} salt-master-macos: file.managed: @@ -75,3 +77,12 @@ remove-default-master-conf-file: remove-old-master-conf-file: file.absent: - name: {{ salt_settings.config_path }}/master.d/_defaults.conf + +{%- else %} + +salt-master-install-skip: + test.show_notification: + - text: | + No salt-master state for Windows + +{%- endif %}