首页 > 其他 > 详细

ansible部署

时间:2020-05-15 10:59:17      阅读:59      评论:0      收藏:0      [点我收藏+]

1. ansible安装

1.1 环境

  • centos6.5系统

  • 服务端python2.6及python2.7

  • 客户端只需要安装python2.5及以上和ssh

1.2 部署

(1)源码安装

 安装

  #git clone git://github.com/ansible/ansible.git --recursive

  #cd ./ansible

  #source  ./hacking/env-setup

  #yum -y install python-pip

  #pip install paramiko PyYAML Jinja2 httplib2 six

  #echo "127.0.0.1" > ~/ansible_hosts

  #export ANSIBLE_HOSTS=~/ansible_hosts

  #ansible all -m ping --ask-pass
 升级

  # git pull --rebase

  # git submodule update --init --recursive


(2)yum安装
  #
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

  #yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

  #yum install ansible -y

 

 (3)rpm安装

  # git clone git://github.com/ansible/ansible.git

  # cd ./ansible

  # make rpm

  # rpm -Uvh ~/rpmbuild/ansible-*.noarch.rpm



ansible部署

原文:https://www.cnblogs.com/wwchihiro/p/12893554.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!