ansible模块-服务模块
ansible查看帮助方法
# 查看所有模块帮助信息
ansible-doc -l   
# 指定查看某个模块参数用法
ansible-doc copy  
1.service服务模块
⚠️是stopped,不是stoped
ansible all -m service -a "name=httpd state=stopped enabled=yes"
service模块参数
| 参数 | 说明 | 
|---|---|
| name | 定义要启动服务的名称 | 
| enabled | 是否让服务开机自启 | 
| state | started:启动 stopped:停止 restarted:重启 reloaded:重载  | 

