ansible基础-ansible的安装和常用模块介绍

                                        作者:尹正杰 

版权声明:原创作品,谢绝转载!否则将追究法律责任。

 

 

 

 

一.ansible基础知识

1>.什么是ansible

  ansible是新出现的自动化运维工具,基于Python开发,集合了众多运维工具(puppet、cfengine、chef、func、fabric)的优点,实现了批量系统配置、批量程序部署、批量运行命令等功能。

2>.ansible特点

  模块化:调用特定的模块,完成特定任务。

  基于Python语言实现,由Paramiko,PyYAML和Jinja2三个关键模块。

  部署简单:agentless。

  支持自定义模块。

  支持playbook。

  幂等性特性。

2>.ansible架构图

ansible基础-ansible的安装和常用模块介绍

 

 

二.安装和配置ansible

1>.查看yum源,我们此处默认你的服务器是可以联网

[root@node101.yinzhengjie.org.cn ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.shu.edu.cn
 * extras: mirrors.shu.edu.cn
 * updates: mirrors.nwsuaf.edu.cn
repo id                                                                                                         repo name                                                                                                          status
base/7/x86_64                                                                                                   CentOS-7 - Base                                                                                                    10,019
extras/7/x86_64                                                                                                 CentOS-7 - Extras                                                                                                     371
updates/7/x86_64                                                                                                CentOS-7 - Updates                                                                                                  1,158
repolist: 11,548
[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# yum repolist

相关文章: