ansible service模块使用示例
模块 示例 Service Ansible 使用
2023-09-14 09:01:52 时间
示例一、启动httpd服务
# ansible 192.168.85.251 -m service -a "name=httpd state=started" -i hosts
示例二、重载httpd服务
# ansible 192.168.85.251 -m service -a "name=httpd state=reloaded" -i hosts
示例三、重启Httpd服务
ansible 192.168.85.251 -m service -a "name=httpd state=restarted" -i hosts
示例四、停止httpd服务
ansible 192.168.85.251 -m service -a "name=httpd state=stopped" -i hosts
示例五、 启动httpd服务,并加入开机自启
ansible 192.168.85.251 -m service -a "name=httpd state=started enabled=yes" -i hosts
相关文章
- python的random模块(生成验证码)
- destoon7.0/8.0地图sitemap根据模块目录输出sitemap.xml
- 传感器--热敏温度传感器模块
- pysimplegui模块实现倒计时UI框
- Node.js模块 require和 exports
- Python基于socket模块实现UDP通信功能示例
- python中hashlib模块用法示例
- python:利用logbook模块管理日志
- python-面向对象-12_模块和包
- ansible file模块:创建目录
- python pyyaml模块使用示例:读取yaml文件内容
- atitit.TokenService v3 qb1 token服务模块的设计 新特性.docx
- Python编程语言学习:包导入和模块搜索路径(包路径)简介、使用方法(python系统环境路径的查询与添加)之详细攻略
- Child Process模块
- [转编] 企业架构模式之领域逻辑模式的实现(事务脚本、领域模型、表模块、活动记录)
- Python自动化测试必会模块Unittest
- 2023年中职组“网络安全”赛项广西自治区竞赛任务书A模块解析(详细)