栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

安装ansible

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

安装ansible

[root@localhost yum.repos.d]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2495  100  2495    0     0   8234      0 --:--:-- --:--:-- --:--:--  8234
[root@localhost yum.repos.d]# ls
CentOS-Base.repo
[root@localhost yum.repos.d]# sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
[root@localhost yum.repos.d]# dnf clean all
25 files removed
[root@localhost yum.repos.d]# dnf list all|grep ansible
ansible-collection-microsoft-sql.noarch                1.1.0-1.el8                                                AppStream        
ansible-collection-redhat-rhel_mgmt.noarch             1.0.0-2.el8                                                AppStream        
ansible-freeipa.noarch                                 0.3.8-1.el8                                                AppStream        
ansible-freeipa-tests.noarch                           0.3.8-1.el8                                                AppStream        
ansible-pcp.noarch                                     2.2.1-1.el8                                                AppStream        
centos-release-ansible-29.noarch                       1-2.el8                                                    extras           
[root@localhost yum.repos.d]# yum install -y https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm
[root@localhost yum.repos.d]# sed -i 's|^#baseurl=https://download.example/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel*
sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*
[root@localhost ~]# dnf makecache
CentOS-8.5.2111 - Base - mirrors.aliyun.com           17 kB/s | 3.9 kB     00:00    
CentOS-8.5.2111 - Extras - mirrors.aliyun.com         12 kB/s | 1.5 kB     00:00    
CentOS-8.5.2111 - AppStream - mirrors.aliyun.com      29 kB/s | 4.3 kB     00:00    
Metadata cache created.
[root@localhost ~]# yum -y install centos-release-ansible-29
[root@localhost ~]# yum -y install ansible
[root@localhost ~]# ansible --version
ansible 2.9.27
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.6.8 (default, Jan 19 2022, 23:28:49) [GCC 8.5.0 20210514 (Red Hat 8.5.0-7)]

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/926184.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号