官术网_书友最值得收藏!

Testing

To test that Ansible is working correctly and that we can successfully connect and run commands remotely, let's use the Ansible ping command to check one of our hosts. Note that this is not like a network ping, Ansible ping confirms that it can communicate via SSH and execute commands remotely:

    $ ansible mon1 -m ping

The preceding command gives the following output:

Excellent, that worked, now let's run a simple command remotely to demonstrate the power of Ansible. The following command will retrieve the current running kernel version on the specified remote node:

    $ ansible mon1 -a 'uname -r'

This is the desired result:

主站蜘蛛池模板: 罗江县| 富源县| 手游| 南召县| 新沂市| 高要市| 闻喜县| 澄迈县| 枣庄市| 荔波县| 武清区| 凌源市| 安阳市| 淄博市| 岚皋县| 综艺| 乌审旗| 彰化县| 花垣县| 陵川县| 阜阳市| 阿鲁科尔沁旗| 横山县| 万山特区| 荥阳市| 苏州市| 陆良县| 武安市| 都安| 游戏| 迭部县| 华宁县| 榆树市| 甘孜| 辽源市| 华池县| 蓬莱市| 开阳县| 锦屏县| 鄂伦春自治旗| 阿鲁科尔沁旗|