什麼是ansible
ansible是python中的一套模塊,系統中的一套自動化工具,可以用來作系統管理、自動化命令、等任務。
ansible優勢
(1) ansible是python中的一套完整的自動化執行任務模塊
(2) ansible的play_book模式,採用yaml配置,對於自動化任務執行一目瞭然
(3) 自動化場景支持豐富
ansible安裝
(1) 通過系統的方式,yum、apt-get等 (推薦)
[root@test-1 ~]# yum install ansible -y
(2) 通過python的方式
- python ./setup.py install
- easy_install ansible
- pip install ansible
[root@1-230 tools]# cd /tools/ [root@1-230 tools]# tar zxf ansible-2.5.11.tar.gz [root@1-230 tools]# which python /usr/bin/python [root@1-230 tools]# cd ansible-2.5.11 [root@1-230 ansible-2.5.11]# ls setup.py setup.py [root@1-230 ansible-2.5.11]# /usr/bin/python ./setup.py install