From d730d4f2b853d659676fd724f9543505b0ee4c3e Mon Sep 17 00:00:00 2001 From: Devon Stewart Date: Tue, 6 Oct 2015 17:13:25 -0700 Subject: [PATCH] Using cfg_salt['master'] is never the right answer - When it's iterable, the minion could be running on the master - When it's a string, there's no advantage over just specifying `salt:minion:master` --- salt/files/minion.d/f_defaults.conf | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/salt/files/minion.d/f_defaults.conf b/salt/files/minion.d/f_defaults.conf index 681fa96..b3cb6b3 100644 --- a/salt/files/minion.d/f_defaults.conf +++ b/salt/files/minion.d/f_defaults.conf @@ -20,8 +20,7 @@ {{ get_config('default_include', 'minion.d/*.conf') }} # master configs -{%- if 'master' in cfg_minion -%} -{%- if cfg_minion['master'] is not string %} +{%- if 'master' in cfg_minion and cfg_minion['master'] is not string %} master: {% for name in cfg_minion['master'] -%} - {{ name }} @@ -29,16 +28,6 @@ master: {%- else %} {{ get_config('master', 'salt') }} {%- endif %} -{% elif 'master' in cfg_salt -%} -{%- if cfg_salt['master'] is not string %} -master: - {% for name in cfg_salt['master'] -%} - - {{ name }} - {% endfor -%} -{%- else %} -{{ get_config('master', 'salt') }} -{%- endif -%} -{%- endif %} # choose a random master {{ get_config('random_master', 'False') }}