和其他配置管理工具不同的是,Ansible着重于使配置管理工作变的更加简单,通过简单的英语配置语法,这很容易做到。你不再需要编写自定义的配置和部署脚本,让你的工作变的更加简单。
Ansible只需要安装管理机器上,不需要安装在被管理机器上安装Ansible。他也不需要在我们在管理机器上做很多基础设施的建设、配置,在安装完Ansible仅仅几分钟后就可以使用,本章将展示这一过程。
我们把通过命令行控制其他设备的机器称为控制机器,其他的设备我们称之为受管机器。Ansible对控制机器的要求不高,对受管机器要求更低。
下面是控制机器的要求:
python2.6或者以上
paramiko
pyyaml
jinja2
受管机器仅要求安装了python2.4或者以上版本就可以了!
The following are the topics covered in this chapter: ? Installing Ansible ? Configuring Ansible ? Using Ansible from the command line ? How to get help Installation methods If you want to use Ansible to manage a set of existing machines or infrastructure, you will likely want to use whatever package manager is included on those systems. This means that you will get updates for Ansible as your distribution updates it, which may lag several versions behind other methods. However, it doesn't mean that you will be running a version that has been tested to work on the system you are using. If you run an existing infrastructure but need a newer version of Ansible, you can install Ansible via pip. Pip is a tool used to manage packages of Python software and libraries. Ansible releases are pushed to pip as soon as they are released, so if you are up to date with pip, you should always be running the latest version. If you imagine yourself developing lots of modules and possibly contributing back to Ansible, you should be running a checked-out version. As you will be running the latest and least tested version of Ansible, you may experience a hiccup or two. Installing from your distribution Most modern distributions include a package manager that automatically manages package dependencies and updates for you. This makes installing Ansible via your package manager by far the easiest way to get started with Ansible; usually it takes only a single command. It will also be updated as you update your machine, though it may be a version or two behind. The following are the commands to install Ansible on the most common distributions. If you are using something different, refer to the user guide for your package or your distribution's package lists. ? Fedora, RHEL, CentOS, and compatible: $ yum install ansible ? Ubuntu, Debian, and compatible: $ apt-get install ansible以下是本章主题:
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/shouji/article-49614-1.html
看做事一种反社会行为呢