When fatal: happens when using iteration, all results are lost even if ignore_errors is true #83159
Open
1 task done
Labels
affects_2.16
bug
This issue/PR relates to a bug.
verified
This issue has been verified/reproduced by maintainer
Summary
I am trying to write simple fact-setting check verifying that user can
become
certain roles. As playbook can run either as unprivileged user (without-K
) or asroot
, sudo password is not always provided. This check iterates over names ofbecome
users and attempts to become each of them either successfully or not. Goal was to collect results and set facts based on them so that other tasks/roles can be skipped using simplewhen: has_root
,when: has_user
, etc.Problem is that when
sudo
password is not provided (and required), it results in fatal and ALL results are lost even if some hosts actually pass andignore_errors
(orfailed_when: false
) is in place.Issue Type
Bug Report
Component Name
become
Ansible Version
Configuration
OS / Environment
Debian GNU/Linux 12
Steps to Reproduce
Where
test
is the user configured to connect to managed node, root requires sudo password which is not provided at this moment.Expected Results
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: