一、列出当前支持的模块

ansible-doc -l[cedar@Ansible ~]$ ansible-doc -l | grep pingwin_ping                                                      A windows version of the classic ping module                                                  postgresql_ping                                               Check remote PostgreSQL server availability                                                   lambda_event                                                  Creates, updates or deletes AWS Lambda function event mappings                                net_ping                                                      Tests reachability using ping from a network device                                           ping                                                          Try to connect to host, verify a usable python and return `pong' on success 

二、查看某个模块的使用说明

[cedar@Ansible ~]$ ansible-doc ping> PING    (/usr/lib/python2.7/site-packages/ansible/modules/system/ping.py)        A trivial test module, this module always returns `pong' on successful contact. It does not make sense in playbooks, but        it is useful from `/usr/bin/ansible' to verify the ability to login and that a usable Python is configured. This is NOT        ICMP ping, this is just a trivial test module that requires Python on the remote-node. For Windows targets, use the        [win_ping] module instead. For Network targets, use the [net_ping] module instead.  * This module is maintained by The Ansible Core TeamOPTIONS (= is mandatory):- data        Data to return for the `ping' return value.        If this parameter is set to `crash', the module will cause an exception.        [Default: pong]        type: strSEE ALSO:      * Module net_ping           The official documentation on the net_ping module.           https://docs.ansible.com/ansible/2.9/modules/net_ping_module.html      * Module win_ping           The official documentation on the win_ping module.           https://docs.ansible.com/ansible/2.9/modules/win_ping_module.htmlAUTHOR: Ansible Core Team, Michael DeHaan        METADATA:          status:          - stableinterface          supported_by: coreEXAMPLES:# Test we can logon to 'webservers' and execute python with json lib.# ansible webservers -m ping# Example from an Ansible Playbook- ping:
©著作权归作者所有:来自51CTO博客作者wx592bc92b285c7的原创作品,如需转载,请注明出处,否则将追究法律责任

好知识,才能预见未来

赞赏

0人进行了赞赏支持

更多相关文章

  1. 一看就懂,Python 日志模块详解及应用
  2. TensorFlow layers模块用法
  3. Ansible 之 ansible的模块使用
  4. Ansible 之 ansible的模块使用帮助
  5. Ansible 之 通过yum模块安装软件
  6. 附实战代码|告别OS模块,体验Python文件操作新姿势!
  7. 13个知识点,系统整理Python时间处理模块Datetime
  8. Python实现数据写入 Excel 的三种模块!
  9. Ansible 之 lineinfile 模块使用

随机推荐

  1. 百度地图 Android SDK 技术详解集锦
  2. 【MNN学习五】在Android上部署MobileNetS
  3. Android: Attaching Sources to Librarie
  4. Android(安卓)手势检测及通过手势实现翻
  5. [zz http://www.cnblogs.com/oldfeel/arc
  6. Android中RelativeLayout相关属性
  7. Android 错误 'roundIcon' in package 'a
  8. Android编译系统
  9. 扫描二维码自动识别手机系统(Android/IOS)
  10. Android Studio使用问题解决