名字解释
执行ansible的主机一般称为主控端,中控,master或堡垒机
ansible安装
1. 命令行查看Python
# python --vesion
python 版本需要是2.4以上版本(Python 3.0是不同语言)
2. 使用yum安装ansible时,可能会出现没有可用软件包ansible的情况,这个时候需要先安装epel (什么是epel)
# yum -y install ansible
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
没有可用软件包 ansible。
错误:无须任何处理
# yum -y install epel-release
# pwd;ls -l epel*
/etc/yum.repos.d
-rw-r--r-- 1 root root 951 10月 3 2017 epel.repo
-rw-r--r-- 1 root root 1050 10月 3 2017 epel-testing.repo
2. 安装ansible
# yum -y install ansible
ansible是基于python开发,安装过程中,会看到需要安装很多python相关的依赖包
3. ansible版本查看
# ansible --version
ansible 2.9.18
config file = /etc/ansible/ansible.cf