Ansible学习--环境安装

Ansible是基于python开发的一个批量执行工具。具有no agents的特性,没有客户端,不会影响目标主机。
使用vmware在本地搭建Ubuntu 14.04 的环境。

在执行机上执行

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/

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容