模块

查看模块

ansible-doc -l

查看指定模块的帮助信息

ansible-doc -s MODULE

# 查看 MODULE 模块的帮助信息

command 模块

ansible web_server -m command -a "hostname -I"
triangle-exclamation

shell 模块

ansible web_server -m shell -a "/server/scripts/time.sh"

# Shell脚本需要存在于远程主机上

copy 模块

script 模块

cron 模块

Last updated