fjqzyc 发表于 2018-7-29 10:52:44

gitlab+jenkins+maven+docker持续集成(九)——centos7 ansible安装及问题汇总

  centos7最小化安装ansibles
  1、error: cffi 1.6.0 is installed but cffi>=1.7 is required by set(['cryptography'])
yum remove -y python-cffi  
pip install cffi>=1.8.0
2、easy_install command not found
  wget https://bootstrap.pypa.io/ez_setup.py -O - | python
  安装ansible
  #easy_install simplejson
  #easy_install pip
  #yum install gcc python-devel
  #easy_install ansible
  ansible验证安装
  设置无密码ssh访问远程主机:
#ssh-keygen -t rsa  
#ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.10.24
  创建ansible主机列表:
  默认路径 /etc/ansible/hosts主机列表可以是静态配置文件,可通过 -i 选项指定。
  
#mkdir /etc/ansibles  
# vi /etc/ansible/hosts
  

  
192.168.10.24
  测试远程主机的运行状态
# ansible test -m ping  
192.168.10.24 | SUCCESS => {
  
    "changed": false,
  
    "ping": "pong"
  
}
页: [1]
查看完整版本: gitlab+jenkins+maven+docker持续集成(九)——centos7 ansible安装及问题汇总