From 2102c7c318ef02f3506a8d3003ed1d41a04b190e Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 26 Apr 2020 10:51:10 +0200 Subject: salt: T2382: id and master nodes are mandatory - use in verify() --- src/conf_mode/salt-minion.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/conf_mode/salt-minion.py b/src/conf_mode/salt-minion.py index 78eda08f3..55139dca1 100755 --- a/src/conf_mode/salt-minion.py +++ b/src/conf_mode/salt-minion.py @@ -78,6 +78,15 @@ def get_config(): return salt def verify(salt): + if not salt: + return None + + if not salt['salt_id']: + raise ConfigError('Missing mandatory salt id!') + + if not salt['master']: + raise ConfigError('Salt master must be defined!') + return None def generate(salt): -- cgit v1.2.3