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.
More on Rapid-Fire Commands
How do you see which hosts a playbook would run against, without running it?BeginnerHow do you list the tasks and tags a playbook contains?BeginnerHow do you inspect the inventory structure and a host's variables?BeginnerHow do you restart a service on a group with an ad-hoc command?BeginnerHow do you resume a playbook from a specific task or step through it?BeginnerHow do you re-run a playbook only on the hosts that failed?Intermediate