What does `ignore_unreachable` do?
IntermediateConceptVault, Privilege Escalation and Error Handling
Answer
By default an unreachable host (SSH down) is removed from the play. ignore_unreachable: true on a task or block lets the play keep that host in rotation for later tasks, which is useful around a reboot or a firewall change.
- ansible.builtin.command: shutdown -r +1
async: 1
poll: 0
ignore_unreachable: true
It is not the same as ignore_errors: unreachable and failed are separate states. The built-in reboot module handles most reboot cases without it.
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