1
0
mirror of https://github.com/openshift/openshift-ansible.git synced 2026-02-05 15:45:57 +01:00

Fix ansible_syntax check

This commit is contained in:
Russell Teague
2017-09-05 09:20:17 -04:00
parent 2687979a5d
commit 2907ea9e47

View File

@@ -58,7 +58,7 @@ def find_entrypoint_playbooks():
os.path.join(os.getcwd(), 'playbooks'),
exclude_dirs, None, r'\.ya?ml$'):
with open(yaml_file, 'r') as contents:
for task in yaml.safe_load(contents):
for task in yaml.safe_load(contents) or {}:
if not isinstance(task, dict):
# Skip yaml files which are not a dictionary of tasks
continue