- The inventory is a list of machines: the name in Ansible, the address
ansible_host, the useransible_userand groups;ansible.cfgin the directory says where the inventory is. UNREACHABLE!means SSH did not connect and the module never ran: look for the cause in the name, the address, the user and the key.- The ad-hoc command
ansible <machines> -m <module> -a '…'does one job on every machine:CHANGED— it changed something,SUCCESS— there was nothing to change, andcommandalways answersCHANGED. -bruns the module as root through sudo,ansible_connection=localruns it on this machine without SSH.- app1 at the start of the lesson was out of reach because of its inventory line: the machine did not know the address app1.lab.test, and deploy had no key.
Step 5 of 5 · summary · 3 min
Summary
Found an inaccuracy? Report an error in the lesson