Interview Prep/Ansible/Rapid-Fire Commands

How do you debug a connection problem at the lowest level?

IntermediateProductionRapid-Fire Commands
Answer
ansible web01 -m ansible.builtin.ping -vvvv
ANSIBLE_KEEP_REMOTE_FILES=1 ansible web01 -m ansible.builtin.setup -vvv
ANSIBLE_DEBUG=1 ansible web01 -m ansible.builtin.ping

-vvvv shows the full SSH command and its output. ANSIBLE_KEEP_REMOTE_FILES=1 leaves module files in ~/.ansible/tmp on the target so you can run them by hand. ANSIBLE_DEBUG is very noisy; use it last.

All Ansible questions Roadmap: Ansible

More on Rapid-Fire Commands