aa36b02ede
Since Ansible 2.9.8, if the fileglob plugin is passed a path containing a subdirectory of a non-existent directory, it will fail. For example: lookup('fileglob', '/'): ok lookup('fileglob', '/foo'): (non-existent): ok lookup('fileglob', '/foo/bar'): (non-existent): FAIL The exact error depends on Python 2 or 3, but here is the error on Python 2: AttributeError: 'NoneType' object has no attribute 'endswith' And on Python 3: TypeError: expected str, bytes or os.PathLike object, not NoneType This change fixes the issue by skipping paths that are falsey before passing them to os.path.join(). Fixes: #69450
15 lines
355 B
Bash
Executable file
15 lines
355 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -eux
|
|
|
|
# fun multilevel finds
|
|
for seed in play_adj play_adj_subdir somepath/play_adj_subsubdir in_role otherpath/in_role_subdir
|
|
do
|
|
ansible-playbook find_levels/play.yml -e "seed='${seed}'" "$@"
|
|
done
|
|
|
|
# non-existent paths
|
|
for seed in foo foo/bar foo/bar/baz
|
|
do
|
|
ansible-playbook non_existent/play.yml -e "seed='${seed}'" "$@"
|
|
done
|