What are the exit codes of `ansible-playbook`?
IntermediateConceptVault, Privilege Escalation and Error Handling
Answer
0— success1— error (generic)2— one or more hosts failed3— one or more hosts were unreachable4— parser error5— bad or incomplete options99— interrupted by the user250— unexpected error
CI jobs rely on these. Note that ignore_errors and rescued failures still return 0, and a run where every host is unreachable returns 3, not 2.
More on Vault, Privilege Escalation and Error Handling
What is Ansible Vault?BeginnerWhich `ansible-vault` commands do you use day to day?BeginnerHow do you supply the vault password when running a playbook?BeginnerWhat is `encrypt_string` and when is it better than encrypting a whole file?IntermediateWhat are vault IDs and why use them?AdvancedHow is Vault data encrypted and what does the file look like?Advanced