zoukankan      html  css  js  c++  java
  • Ansible--安装

    yum 安装

    [root@ansible ~]# yum -y install epel-release
    [root@ansible ~]# yum -y install ansible
    [root@ansible ~]# ansible --version
    ansible 2.7.5
      config file = /etc/ansible/ansible.cfg
      configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
      ansible python module location = /usr/lib/python2.7/site-packages/ansible
      executable location = /usr/bin/ansible
      python version = 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
    

     至此ansible安装完成!!!

    源码安装

    安装依赖的包
    [root@ansible ~]# yum -y install python-jinja2 python-paramiko PyYAML python-bable python-cypto wget
    
    下载ansible源码包(在github下载的)
    [root@ansible ~]# wget https://github.com/ansible/ansible/archive/v2.7.5.tar.gz
    
    解压
    [root@ansible ~]# tar zxf v2.7.5.tar.gz
    [root@ansible ~]# cd ansible-2.7.5/
    
    安装
    [root@ansible ansible-2.7.5]# python setup.py build
    [root@ansible ansible-2.7.5]# python setup.py install
    [root@ansible ansible-2.7.5]# mkdir /etc/ansible
    [root@ansible ansible-2.7.5]# cp -r examples/* /etc/ansible/
    
    查看是否安装成功
    [root@ansible ansible-2.7.5]# ansible --version
    ansible 2.7.5
      config file = /etc/ansible/ansible.cfg
      configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
      ansible python module location = /usr/lib/python2.7/site-packages/ansible-2.7.5-py2.7.egg/ansible
      executable location = /usr/bin/ansible
      python version = 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)
    

     至此ansible安装完成!!!

    Git安装

    安装依赖的包
    [root@ansible ~]# yum -y install epel-release
    [root@ansible ~]# yum -y install python-jinja2 python-paramiko PyYAML python-bable python-cypto wget git
    
    下载ansible
    [root@ansible ~]# git clone git://github.com/ansible/ansible.git --recursive
    [root@ansible ~]# cd ansible/
    [root@ansible ansible]# source ./hacking/env-setup
    [root@ansible ansible]# ansible --version     
    ansible 2.8.0.dev0 (devel 4fe346da18) last updated 2018/12/23 14:44:26 (GMT +800)
      config file = None
      configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
      ansible python module location = /root/ansible/lib/ansible
      executable location = /root/ansible/bin/ansible
      python version = 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)
    

     至此ansible安装完成!!!

    Pip安装

    [root@ansible ~]# yum -y install epel-release
    [root@ansible ~]# yum -y install python-devel python-pip gcc glibc-devel zibl-devel rpm-build openssl-devel
    [root@ansible ~]# pip install --upgrade pip
    [root@ansible ~]# pip install ansible --upgrade
    [root@ansible ~]# ansible --version
    ansible 2.7.5
      config file = None
      configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
      ansible python module location = /usr/lib/python2.7/site-packages/ansible
      executable location = /usr/bin/ansible
      python version = 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
    

     至此ansible安装完成!!!

    Ansible使用

    ansbile的基础使用及配置文件详情:https://www.cnblogs.com/brianzhu/p/10164379.html

  • 相关阅读:
    css常用属性记录
    js字符串常用方法总结
    mongoose基本操作
    本地存储API
    历史相关API
    自定义播放器
    HTML5全屏操作API
    HTML5自定义属性操作
    HTML5类操作
    案例:3D切割轮播图
  • 原文地址:https://www.cnblogs.com/brianzhu/p/10163899.html
Copyright © 2011-2022 走看看