首页 > 其他 > 详细

Ansible 安装和管理服务

时间:2019-01-03 13:29:48      阅读:119      评论:0      收藏:0      [点我收藏+]

ansible 使用 yum 模块来安装软件包,使用 service 模块来启动软件:

[root@localhost ~]$ ansible 192.168.119.134 -m yum -a "name=httpd"                                  # 安装软件包
[root@localhost ~]$ ansible 192.168.119.134 -m yum -a "name=httpd state=removed"                    # 卸载软件包
[root@localhost ~]$ ansible 192.168.119.134 -m service -a "name=httpd state=started enabled=yes"    # 启动并设置成开机启动

 

 

 

 

    

Ansible 安装和管理服务

原文:https://www.cnblogs.com/pzk7788/p/10213567.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!