Ansible 之 ansible-doc模块文档说明
16lz
2021-01-22
一、列出当前支持的模块
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人进行了赞赏支持
更多相关文章
- 一看就懂,Python 日志模块详解及应用
- TensorFlow layers模块用法
- Ansible 之 ansible的模块使用
- Ansible 之 ansible的模块使用帮助
- Ansible 之 通过yum模块安装软件
- 附实战代码|告别OS模块,体验Python文件操作新姿势!
- 13个知识点,系统整理Python时间处理模块Datetime
- Python实现数据写入 Excel 的三种模块!
- Ansible 之 lineinfile 模块使用