class

Krikri::StaticImportMissingFileError

Inherits Exception < Reference < Object

Raised at PARSE time when an import_tasks: path templates fine but the resolved file genuinely doesn't exist. ansible-playbook aborts the WHOLE run there - "[ERROR]: Unable to retrieve file contents. Could not find or access '<resolved>' on the Ansible Controller.", no PLAY RECAP (verified against ansible-core 2.19.11 with a minimal repro, both as a templated path that resolves to a missing file and as a plain literal missing path - identical fatal shape; lucascbeyeler.zimbra's import_tasks: "vars/{{ zimbra_version }}.yml" -> vars/8.8.12.yml with only vars/8.8.15.yml on disk, round 900185). Bypasses parse_tasks's generic per-task rescue (same mechanism as StaticImportUndefinedError) - the bare-Exception raise this used to be got swallowed into a "Warning: Skipping task N" and the run went on without the import's tasks, exit 0, instead of failing the playbook the way Ansible does.

Byte shape (live-verified against 2.21.6 in a container): this is the DataLoader's AnsibleFileNotFound, NOT a parser error - no Origin block, on STDERR, and rc=1 rather than the parser-error 4. 2.21 folds the chained OSError and the "If you are using a module..." help text into that single line (static_import_missing_file_render builds it):

[ERROR]: Unable to retrieve file contents. Could not find or
access '/work/bhwidi' on the Ansible Controller: [Errno 2] No
such file or directory: '/work/bhwidi' If you are using a
module and expect the file to exist on the remote, see the
remote_src option.

Constructors

new(render : String)
Source

Instance methods

render
Source