IT袋

当前位置:主页 > 经验教程 > 系统教程 >

Ansible安装配置和基本使用

Ansible安装配置和基本使用

时间:2023-09-21 18:51:35 来源:IT袋 作者:苏晓敏
导读:Ansible安装配置和基本使用,为网友解答Ansible安装配置和基本使用方面的内容,具体内容如下: 一、Ansible安装 Ansible的安装方法主要有以下四种: 1.1 yum使用EPEL源安装 mv /etc/yum.repos.d/epel.repo /etc/yum

Ansible安装配置和基本使用

为网友解答Ansible安装配置和基本使用方面的内容,具体内容如下:

一、Ansible安装

Ansible的安装方法主要有以下四种:

1.1 yum使用EPEL源安装

mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup
wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
yum clean all && yum makecache
# 可以使用以下三种方式查看ansible包的信息
yum info ansible
yum list ansible
yum list | grep ansible
ansible.noarch                                                      2.9.27-1.el7                                                  epel
ansible-collection-microsoft-sql.noarch                             1.1.0-1.el8                                                   AppStream
ansible-collection-redhat-rhel_mgmt.noarch                          1.0.0-2.el8                                                   AppStream
ansible-doc.noarch                                                  2.9.27-1.el7                                                  epel
ansible-freeipa.noarch                                              0.3.8-1.el8                                                   AppStream
ansible-freeipa-tests.noarch                                        0.3.8-1.el8                                                   AppStream
ansible-inventory-grapher.noarch                                    2.4.4-1.el7                                                   epel
ansible-lint.noarch                                                 3.5.1-1.el7                                                   epel
ansible-openstack-modules.noarch                                    0-20140902git79d751a.el7                                      epel
ansible-pcp.noarch                                                  2.2.1-1.el8                                                   AppStream
ansible-python3.noarch                                              2.9.27-1.el7                                                  epel
ansible-review.noarch                                               0.13.4-1.el7                                                  epel
ansible-test.noarch                                                 2.9.27-1.el7                                                  epel
centos-release-ansible-29.noarch                                    1-2.el8                                                       extras
kubernetes-ansible.noarch                                           0.6.0-0.1.gitd65ebd5.el7                                      epel
python2-ansible-runner.noarch                                       1.0.1-1.el7                                                   epel
python2-ansible-tower-cli.noarch                                    3.3.9-1.el7                                                   epel
vim-ansible.noarch                                                  3.2-1.el7
# 安装ansible
yum -y install ansible
ansible --version

相关阅读