mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 19:01:26 -07:00
added keyed_group construction (#28578)
* added keyed_group construction also added strict config to allow skipping bad templating more precise error msgs to_native better than to_text fixed truthyness added safe names * allow keyed expressions to return lists * PEPE should eat less, he is getting fat
This commit is contained in:
parent
1afbe29642
commit
95eaa246aa
4 changed files with 97 additions and 32 deletions
|
@ -371,17 +371,10 @@ class DataLoader:
|
|||
b_mydir = os.path.dirname(b_upath)
|
||||
|
||||
# if path is in role and 'tasks' not there already, add it into the search
|
||||
if is_role or self._is_role(path):
|
||||
if b_mydir.endswith(b'tasks'):
|
||||
if (is_role or self._is_role(path)) and b_mydir.endswith(b'tasks'):
|
||||
search.append(os.path.join(os.path.dirname(b_mydir), b_dirname, b_source))
|
||||
search.append(os.path.join(b_mydir, b_source))
|
||||
else:
|
||||
# don't add dirname if user already is using it in source
|
||||
if b_source.split(b'/')[0] != b_dirname:
|
||||
search.append(os.path.join(b_upath, b_dirname, b_source))
|
||||
search.append(os.path.join(b_upath, b_source))
|
||||
|
||||
elif b_dirname not in b_source.split(b'/'):
|
||||
else:
|
||||
# don't add dirname if user already is using it in source
|
||||
if b_source.split(b'/')[0] != dirname:
|
||||
search.append(os.path.join(b_upath, b_dirname, b_source))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue