ansible-基础和安装

  1. 什么是ansible
    ansible是python中的一套模块,系统中的一套自动化工具,可以用来作系统管理、自动化命令、等任务。

  2. ansible优势

    (1) ansible是python中的一套完整的自动化执行任务模块

    (2) ansible的play_book模式,采用yaml配置,对于自动化任务执行一目了然

    (3) 自动化场景支持丰富
  3. ansible安装

    (1) 通过系统的方式,yum、apt-get等 (推荐)
    [root@test-1 ~]# yum install ansible -y

    (2) 通过python的方式
    • python ./setup.py install
    • easy_install ansible
    • pip install ansible
     [root@1-230 tools]# cd /tools/
     [root@1-230 tools]# tar zxf ansible-2.5.11.tar.gz 
     [root@1-230 tools]# which python
     /usr/bin/python
     [root@1-230 tools]# cd ansible-2.5.11
     [root@1-230 ansible-2.5.11]# ls setup.py 
     setup.py
     [root@1-230 ansible-2.5.11]# /usr/bin/python ./setup.py  install

猜你喜欢

转载自www.cnblogs.com/scajy/p/11353748.html