diff options
author | Brian Coca <bcoca@users.noreply.github.com> | 2020-02-25 09:16:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-25 09:16:27 -0500 |
commit | 9ea5bb336400e20178cc6fb3816aef30dbdc8b60 (patch) | |
tree | 0534f037c0c3d1d32bfff53ce4f866e9803136a8 | |
parent | 726d6455d813e40f37e1298f0dce8a2f76709de4 (diff) | |
download | ansible-9ea5bb336400e20178cc6fb3816aef30dbdc8b60.tar.gz |
strip spaces for each value in host list lists (#67701)
-rw-r--r-- | changelogs/fragments/pathlist_strip.yml | 2 | ||||
-rw-r--r-- | lib/ansible/config/manager.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/changelogs/fragments/pathlist_strip.yml b/changelogs/fragments/pathlist_strip.yml new file mode 100644 index 0000000000..b90f7e42bc --- /dev/null +++ b/changelogs/fragments/pathlist_strip.yml @@ -0,0 +1,2 @@ +bugfixes: + - also strip spaces around config values in pathlist as we do in list types 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] |