Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
9341148f
Commit
9341148f
authored
Jul 01, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Throw an error if with_first_found finds no files by default
Fixes #9976
parent
b11e69f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lib/ansible/plugins/lookup/first_found.py
+2
-2
No files found.
lib/ansible/plugins/lookup/first_found.py
View file @
9341148f
...
...
@@ -123,7 +123,7 @@ import os
from
jinja2.exceptions
import
UndefinedError
from
ansible.errors
import
AnsibleUndefinedVariable
from
ansible.errors
import
Ansible
LookupError
,
Ansible
UndefinedVariable
from
ansible.plugins.lookup
import
LookupBase
from
ansible.template
import
Templar
from
ansible.utils.boolean
import
boolean
...
...
@@ -202,5 +202,5 @@ class LookupModule(LookupBase):
if
skip
:
return
[]
else
:
r
eturn
[
None
]
r
aise
AnsibleLookupError
(
"No file was found when using with_first_found. Use the 'skip: true' option to allow this task to be skipped if no files are found"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment