Interview Prep/Ansible/Vault, Privilege Escalation and Error Handling

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.

All Ansible questions Roadmap: Ansible

More on Vault, Privilege Escalation and Error Handling