Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix lookup into search paths when undefined.#1

Open
esuarezsantana wants to merge 1 commit into
develfrom
fix-fileglob-lookup-warning
Open

Fix lookup into search paths when undefined.#1
esuarezsantana wants to merge 1 commit into
develfrom
fix-fileglob-lookup-warning

Conversation

@esuarezsantana

Copy link
Copy Markdown
Owner
SUMMARY

A fileglob may issue a warning Unable to find xxxx in expected paths when ansible_search_path is not defined, because it loops over the characters in the string instead of looping over a list of one element.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

library/plugin/lookup

ANSIBLE VERSION
ansible 2.3.2.0
  config file = /home/eduardo/.ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.13 (default, Mar  6 2017, 16:32:24) [GCC 5.4.0]
ADDITIONAL INFORMATION

Create a role with a task like this:

- local_action:
    module: debug
    msg: "{{ item }}"
  with_fileglob: "test/*.txt"

and some files

# mkdir -p files/test
# touch files/test/{a,b,c}.txt

Run ansible.

A fileglob may issue a warning `Unable to find xxxx in expected paths` when `ansible_search_path` is not defined, because it loops over the characters in the string instead of looping over a list of one element.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant