Skip to content

Instantly share code, notes, and snippets.

@bcoca
Created February 24, 2020 14:56
Show Gist options
  • Save bcoca/39925d8cdab784a9509b44bc4aa1bbd9 to your computer and use it in GitHub Desktop.
Save bcoca/39925d8cdab784a9509b44bc4aa1bbd9 to your computer and use it in GitHub Desktop.
diff --git a/lib/ansible/config/manager.py b/lib/ansible/config/manager.py
index 1731906b31..9825d7351a 100644
--- a/lib/ansible/config/manager.py
+++ b/lib/ansible/config/manager.py
@@ -137,7 +137,7 @@ def ensure_type(value, value_type, origin=None):
elif value_type == 'pathlist':
if isinstance(value, string_types):
- value = value.split(',')
+ value = [x.strip() for x in value.split(',')]
if isinstance(value, Sequence):
value = [resolve_path(x, basedir=basedir) for x in value]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment