ansible 批量重启服务
来源:互联网 发布:shopnc b2b2c 源码 编辑:程序博客网 时间:2024/06/07 12:10
ansible 10.1.1.113 -m service -a 'name=puppet state=restarted enabled=yes' - name: Start MySQL service: name=mysqld state=started enabled=yes handlers: - name: restart mysql service: name=mysqld state=restarted开启ftp[root@node01 ansible]# ansible 192.168.137.3 -m service -a'name=vsftpd state=started enabled=yes'[DEPRECATION WARNING]: DEFAULT_SUDO_USER option, In favor of become which is a generic framework . This feature will be removed in version 2.8. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.192.168.137.3 | SUCCESS => { "changed": true, "enabled": true, "failed": false, "name": "vsftpd", "state": "started"}关闭ftp:[root@node01 ansible]# ansible 192.168.137.3 -m service -a'name=vsftpd state=stopped enabled=yes'[DEPRECATION WARNING]: DEFAULT_SUDO_USER option, In favor of become which is a generic framework . This feature will be removed in version 2.8. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.192.168.137.3 | SUCCESS => { "changed": true, "enabled": true, "failed": false, "name": "vsftpd", "state": "stopped"}重启服务:[root@node01 ansible]# ansible 192.168.137.3 -m service -a'name=vsftpd state=restarted enabled=yes'[DEPRECATION WARNING]: DEFAULT_SUDO_USER option, In favor of become which is a generic framework . This feature will be removed in version 2.8. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.192.168.137.3 | SUCCESS => { "changed": true, "enabled": true, "failed": false, "name": "vsftpd", "state": "started"}
阅读全文
0 0
- ansible 批量重启服务
- ansible 批量停止iptables
- ansible批量传输文件
- 05.12 ansible批量自动化管理工具
- ansible-playbook批量部署nginx
- 重启IIS服务
- 重启vsftp服务
- 重启Oracle服务
- 重启Windwos服务
- 重启sshd服务
- 重启 WMI 服务。
- Android服务重启
- Android服务重启
- 重启crontab服务
- 重启Oracle服务
- 重启adb服务
- adb重启服务
- 重启fastDfs服务
- 高可用的一些思考和理解
- SNPA—子网连接点
- 用ImageView展示数据,并使用handler每过3秒钟切换一张图片
- Fortify配置
- Python使用pandas对数据进行差分运算
- ansible 批量重启服务
- JBoss下运行Spring报警告如何解决
- Andriodjie——二级列表实现购物车
- oracle监听无法手动启动无法重启
- 网络中需要唯一的MAC地址的理由
- JS获取文章概要
- php常用函数总结
- 二级购物车完整版
- Struts tiles使用中遇到的问题