From 2570f4cd39fbe827a723eca2ab8e1d66aeb0cf8d Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Dec 09 2019 22:19:13 +0000 Subject: Whitelist pillar/id/README.md in test_custom_grains.py and get_roles.py --- diff --git a/bin/get_roles.py b/bin/get_roles.py index 1ae6a18..565befe 100755 --- a/bin/get_roles.py +++ b/bin/get_roles.py @@ -34,6 +34,9 @@ def get_roles(append=[]): roles = copy(append) for sls in os.listdir('pillar/id'): + if sls == 'README.md': + continue + _roles = get_roles_of_one_minion(sls) for item in _roles: roles.append(item) diff --git a/bin/test_custom_grains.py b/bin/test_custom_grains.py index 23a2607..582e1a6 100755 --- a/bin/test_custom_grains.py +++ b/bin/test_custom_grains.py @@ -45,6 +45,9 @@ all_valid_localized_grains = get_all_valid_localized_grains() all_ids = sorted(os.listdir('pillar/id')) for sls in all_ids: + if sls == 'README.md': + continue + content = read_file_skip_jinja("pillar/id/%s" % sls) mygrains = yaml.safe_load(content)['grains']