Skip to content
Install

Exit codes

What each exit code means, and where Volant matches ansible-playbook.

Volant exits with the codes ansible-playbook uses, so scripts and CI jobs written for Ansible keep working.

Every host finished without a failure.

A general error: a playbook or a role that cannot be found, an unknown notify name or meta action, or a host pattern that leaves no hosts.

At least one host failed, or the run asked for an escalation method this release does not support yet.

At least one host was unreachable, whether or not others failed, as ansible-playbook reports it, or the playbook stopped before the run: it does not parse, or it uses something this release does not support yet.

A setting has a value it cannot take, such as forks = many, an unknown word for gathering, runtime or host_named_paths, or an order keyword the play does not know. The message names the key and the value.

Ctrl-C or SIGTERM stopped the run. Running batches are cancelled, the recap prints, and Volant exits with 99, as ansible-playbook does.

--step found no terminal on standard input. Volant stops before it touches a host.

After a run, the code comes from the recap: 2 is added when any host failed, and 4 when any host was unreachable. A serial play stops at the first batch that lost every live host, with 2 if they failed and 4 if they all became unreachable.

A playbook stopped by the pre-flight check exits with 4 before any connection, which is what Ansible uses for a playbook it cannot load. Cases whose code was measured on Ansible keep that code: 1 for a missing role, an unknown meta action or an unknown notify name. An unknown notify name in a file a dynamic include brings in is only found during the run, and it ends the run there with 1 too.

In a few cases ansible-core crashes with exit code 250, for example on a playbook that imports itself or on serial: abc. Volant rejects those cases instead, with a clear message and one of the codes above. Each case is listed under Differences from Ansible on the page that covers it.

volant adhoc (ansible) exits with 0 when every host succeeded or was skipped, 2 when a host failed, 4 when a host was unreachable, 1 when -l leaves no host, and 5 for an invalid setting. volant vault (ansible-vault) and volant inventory (ansible-inventory) exit with 0 on success, 1 on an error such as create on a file that exists, and 5 on a bad option or action. A usage error of any of them exits with 2. Ansible command names has the table.