-
Notifications
You must be signed in to change notification settings - Fork 24.1k
Closed
Labels
affects_2.13bugThis issue/PR relates to a bug.This issue/PR relates to a bug.has_prThis issue has an associated PR.This issue has an associated PR.moduleThis issue/PR relates to a module.This issue/PR relates to a module.
Description
Summary
Since #79230 , the file
lookup now seems to ignore setting errors
, so for example, if errors='warn'
or errors='ignore'
, the lookup will still fail on an error as though it was not set at all.
Issue Type
Bug Report
Component Name
file
Ansible Version
$ ansible --version
ansible [core 2.13.6rc1.post0]
config file = None
configured module search path = ['/home/briantist/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/briantist/.a213/lib/python3.8/site-packages/ansible
ansible collection location = /home/briantist/.ansible/collections:/usr/share/ansible/collections
executable location = /home/briantist/.a213/bin/ansible
python version = 3.8.0 (default, Feb 25 2021, 22:10:10) [GCC 8.4.0]
jinja version = 3.1.2
libyaml = True
Configuration
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
DEFAULT_FORKS(env: ANSIBLE_FORKS) = 30
OS / Environment
Ubuntu 18.04
Steps to Reproduce
- debug:
msg: "{{ lookup('file', '_fake', errors='ignore' ) }}"
Expected Results
An ok
task with no contents returned
Actual Results
localhost | FAILED! => {
"msg": "The 'file' lookup had an issue accessing the file '_fake'. file not found, use -vvvvv to see paths searched"
}
Code of Conduct
- I agree to follow the Ansible Code of Conduct
ElieDeloumeau
Metadata
Metadata
Assignees
Labels
affects_2.13bugThis issue/PR relates to a bug.This issue/PR relates to a bug.has_prThis issue has an associated PR.This issue has an associated PR.moduleThis issue/PR relates to a module.This issue/PR relates to a module.