Ansible是基于python開發(fā)的一個批量執(zhí)行工具学辱。具有no agents的特性缎除,沒有客戶端,不會影響目標主機荒辕。
使用vmware在本地搭建Ubuntu 14.04 的環(huán)境汗销。
在執(zhí)行機上執(zhí)行
sudo apt-get update
更新庫
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install ansible
安裝完成后:
cyy@cyy-virtual-machine:~$ ansible --version
ansible 2.3.2.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2]
安裝的版本為:2.3.2.0
安裝好之后ansible的配置文件所在的路徑為:
ansible.cfg 和hosts 文件所在地址
yy@cyy-virtual-machine:/etc/ansible$ ll
總用量 44
drwxr-xr-x 3 root root 4096 8月 31 00:52 ./
drwxr-xr-x 131 root root 12288 8月 31 00:52 ../
-rw-r--r-- 1 root root 18066 8月 9 01:08 ansible.cfg
-rw-r--r-- 1 root root 1016 8月 9 01:08 hosts
drwxr-xr-x 2 root root 4096 8月 9 01:12 roles/