使用 ping 測試連線和配置

ansible -i hosts -m ping targethost

-i hosts 定義清單檔案的路徑
targethost 是 hosts 檔案中主機的名稱