From 1be44c026b6449b9e6b759dfed64282f48b68d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sat, 10 Aug 2019 13:33:07 +0200 Subject: [PATCH] use safe loading of yaml inventory --- eoptasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eoptasks.py b/eoptasks.py index 5e81126..a1f11c7 100755 --- a/eoptasks.py +++ b/eoptasks.py @@ -79,7 +79,7 @@ def get_servers(): sys.exit(1) ignorelist = [x.strip() for x in config.get('config', 'ignore', fallback='').split(',')] - servergroups = yaml.load(open(servergroup))['servergroups'] + servergroups = yaml.safe_load(open(servergroup))['servergroups'] for group in servergroups: for servername in servergroups[group]: if servername in ignorelist: