New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fileglob: support wildcard directories #43393

Open
wants to merge 2 commits into
base: devel
from

Conversation

Projects
None yet
5 participants
@monoflo

monoflo commented Jul 28, 2018

SUMMARY

Modified run so that fileglob supports wildcards in directories.
Accomplished by removing find_file_in_search_path from run.

Fixes #17136

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

fileglob (lookup plugin)

ANSIBLE VERSION
ansible 2.6.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/monoflo/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]
Fileglob: support wildcard directories
Accomplished by removing `find_file_in_search_path` from `run`
#17136
@ansibot

This comment was marked as outdated.

Contributor

ansibot commented Jul 28, 2018

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/plugins/lookup/fileglob.py:58:0: syntax-error invalid syntax (<string>, line 58)

The test ansible-test sanity --test ansible-doc --python 2.6 [explain] failed with 1 error:

lib/ansible/plugins/lookup/fileglob.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 2.7 [explain] failed with 1 error:

lib/ansible/plugins/lookup/fileglob.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.5 [explain] failed with 1 error:

lib/ansible/plugins/lookup/fileglob.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.6 [explain] failed with 1 error:

lib/ansible/plugins/lookup/fileglob.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.7 [explain] failed with 1 error:

lib/ansible/plugins/lookup/fileglob.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test compile --python 2.6 [explain] failed with 1 error:

lib/ansible/plugins/lookup/fileglob.py:58:78: SyntaxError: globbed = glob.glob(to_bytes(term), errors='surrogate_or_strict'))

The test ansible-test sanity --test compile --python 2.7 [explain] failed with 1 error:

lib/ansible/plugins/lookup/fileglob.py:58:78: SyntaxError: globbed = glob.glob(to_bytes(term), errors='surrogate_or_strict'))

The test ansible-test sanity --test compile --python 3.5 [explain] failed with 1 error:

lib/ansible/plugins/lookup/fileglob.py:58:78: SyntaxError: globbed = glob.glob(to_bytes(term), errors='surrogate_or_strict'))

The test ansible-test sanity --test compile --python 3.6 [explain] failed with 1 error:

lib/ansible/plugins/lookup/fileglob.py:58:78: SyntaxError: globbed = glob.glob(to_bytes(term), errors='surrogate_or_strict'))

The test ansible-test sanity --test compile --python 3.7 [explain] failed with 1 error:

lib/ansible/plugins/lookup/fileglob.py:58:78: SyntaxError: globbed = glob.glob(to_bytes(term), errors='surrogate_or_strict'))

The test ansible-test sanity --test docs-build [explain] failed with 3 errors:

docs/docsite/rst/plugins/connection.rst:35:0: undefined-label: undefined label: inventory_hostnames_lookup (if the link has no caption the label must precede a section header)
docs/docsite/rst/plugins/lookup.rst:46:0: unknown-document: unknown document: lookup/items
docs/docsite/rst/plugins/lookup.rst:141:0: toc-tree-glob-pattern-no-match: toctree glob pattern 'lookup/*' didn't match any documents

The test ansible-test sanity --test pep8 [explain] failed with 3 errors:

lib/ansible/plugins/lookup/fileglob.py:59:13: E122 continuation line missing indentation or outdented
lib/ansible/plugins/lookup/fileglob.py:60:9: E122 continuation line missing indentation or outdented
lib/ansible/plugins/lookup/fileglob.py:61:1: E901 TokenError: EOF in multi-line statement

The test ansible-test sanity --test yamllint [explain] failed with 1 error:

lib/ansible/plugins/lookup/fileglob.py:58:78: python-syntax-error invalid syntax (<unknown>, line 58)

click here for bot help

@monoflo

This comment has been minimized.

monoflo commented Jul 29, 2018

I don't believe that the failed check has anything to do with my contribution.

80 / 84 environments succeed. The four that do not report the same issues:

Failures

apt-amdrie90 / /root/ansible/test/integration/targets/apt/tasks/repo.yml:2 / [testhost] testhost: apt : Install foo package version 1.0.0 allow_unauthenticated=True, name=foo=1.0.0

failure: No package matching 'foo' is available

Errors

apt-1etzmtil / /root/ansible/test/integration/targets/apt/tasks/repo.yml:2 / [testhost] testhost: apt : Install foo package version 1.0.0 name=foo=1.0.0, allow_unauthenticated=True

error: raise KeyError('The cache has no package named %r' % key)

Details

https://app.shippable.com/github/ansible/ansible/runs/76286/summary/console

@monoflo

This comment has been minimized.

monoflo commented Jul 30, 2018

@nitzmahone, would you care to review, given your involvement with the issue?
#17136

@jborean93 jborean93 removed the needs_triage label Aug 2, 2018

@ansibot ansibot added the stale_ci label Aug 10, 2018

@monoflo monoflo closed this Aug 24, 2018

@monoflo monoflo reopened this Aug 24, 2018

@ansibot ansibot removed the stale_ci label Aug 24, 2018

@mattclay

This comment has been minimized.

Member

mattclay commented Sep 4, 2018

CI failure in integration tests: https://app.shippable.com/github/ansible/ansible/runs/82500/41/tests

The affected playbook code is probably this:

@mattclay mattclay added the ci_verified label Sep 4, 2018

@bcoca

This ignores 'dwimed' paths so relative files will only be searched in relation to CWD but not in playbook/role contexts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment