本来打算自己写一波 ansible 系列的,后来发现一老哥写的太好了,「点击此处直达」,我这里也就边看边对该系列文章做下笔记,方便以后查阅,ansible 入门的话墙裂建议阅读前方链接博文~~~
模块查看
查看 ansible 都有哪些模块:
$ ansible-doc -l
fortios_router_community_list Configure community lists in Fortinet's FortiOS and FortiGate
azure_rm_devtestlab_info Get Azure DevTest Lab facts
ecs_taskdefinition register a task definition in ecs
avi_alertscriptconfig Module for setup of AlertScriptConfig Avi RESTful Object
...
查看指定模块的详细文档,以查看 ping
模块为例:
$ ansible-doc ping
也可参考「ansible 官方文档」。
常用模块
为避免文章冗长不易阅读,这里每个模块单独给一个超链接~~
- fetch
- copy
- file
- blockinfile
- lineinfile
- find
- replace
- command
- shell
- script
- cron
- service
- user
- group
- yum_repository
- yum
- setup
- debug
- set_fact
- fail
- include_vars
- ini_file
后面有用到其它的模块我就更新在这里~
评论区