关于Ansible(1)
系统版本

在ansible客户端安装ansible无效

使用YUM安装ansible时需要配置epel源,自动解决软件包的依赖关系
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

更换yum源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

[root@localhost ~]#yum clean all
[root@localhost ~]#yum makecache
安装ansible还是会依旧出错
[root@localhost ~]# yum install -y ansible

原因:环境中没有python-simplejson python-babel PyYAML python-six python-pyasn1 python-markupsafe 这些包
解决方法:更换Base.repo yum源,执行
yum install python-simplejson python-babel PyYAML python-six python-pyasn1 python-markupsafe
更换yum源要分别执行
[root@localhost ~]#yum clean all
[root@localhost ~]#yum makecache
[root@localhost ~]#yum install -y python-simplejson python-babel PyYAML python-six python-pyasn1 python-markupsafe
再安装ansible
[root@localhost ~]# yum install -y ansible

 
查看ansible版本型号
[root@localhost ~]# ansible --version

如果ansible--version过程出错,yum install -y python-jinja2,如果提示没有软件包,更新yum源或者下载python-jinja2包手动安装。

                    
                
                
            
        
浙公网安备 33010602011771号