集群管理工具ansible常用命令有哪些
集群管理工具ansible常用命令有哪些
1. ansible all -m ping -u root
2. ansible web -a "df -h"
3. ansible dbs -m yum -a "name=httpd state=present"
4. ansible app -m service -a "name=httpd state=restarted"
5. ansible all -m shell -a "uptime"
6. ansible all -m copy -a "src=/etc/hosts dest=/tmp/hosts"
7. ansible all -m file -a "dest=/tmp/hosts state=absent"
8. ansible all -m fetch -a "src=/etc/hosts dest=/tmp/hosts"
9. ansible all -m command -a "uptime"
10. ansible all -m apt -a "name=apache2 state=present"
相关文章