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

  • Mastering Ceph
  • Nick Fisk
  • 108字
  • 2021-07-09 19:55:15

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:

主站蜘蛛池模板: 西贡区| 葵青区| 图木舒克市| 仁怀市| 定襄县| 名山县| 德州市| 抚远县| 平泉县| 安泽县| 忻州市| 沙坪坝区| 望城县| 浪卡子县| 尼勒克县| 神农架林区| 开江县| 额尔古纳市| 子洲县| 鸡东县| 阿拉善右旗| 南平市| 黔西县| 长葛市| 神农架林区| 凉城县| 岚皋县| 夏邑县| 临泉县| 台南市| 西林县| 顺义区| 朝阳市| 阿巴嘎旗| 鸡西市| 海丰县| 新兴县| 棋牌| 达日县| 德令哈市| 宜都市|