zoukankan      html  css  js  c++  java
  • 01Ansible简介与部署

    Ansible简介

    Ansible概述

    Ansible是新兴的自动化运维工具,基于Python开发,集合了众多运维工具(puppet、cfengine、chef、func、fabric)的优点,实现了批量系统配置、批量程序部署、批量运行命令等功能。

    无需安装客户端。

    Ansible工作原理

    Ansible部署

    环境说明

    ansible服务器:172.22.69.215

    ansible客户机:172.22.69.216、172.22.69.97

    ansible客户机

    无需做任何配置,建议配置yum源

    [root@ansible-node ~]# yum install -y epel-release
    

    ansible服务器

    安装yum源

    [root@ansible-server ~]# yum install -y epel-release
    

    安装epel源,如果在非学校环境,建议使用阿里YUM源:

    [root@ansible-server ~]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
    [root@ansible-server ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 
    

    安装ansible

    [root@ansible-server ~]# yum install -y ansible
    

    列出所有文件:rpm -ql ansible

    查看配置文件:rpm -qc ansible

    查看ansible帮助:ansible --help

    查看所有模块:ansible-doc -l

    查看具体模块的功能:比如查看yum模块,了解其功能:ansible-doc yum

  • 相关阅读:
    poj 1579(动态规划初探之记忆化搜索)
    hdu 1133(卡特兰数变形)
    CodeForces 625A Guest From the Past
    CodeForces 625D Finals in arithmetic
    CDOJ 1268 Open the lightings
    HDU 4008 Parent and son
    HDU 4044 GeoDefense
    HDU 4169 UVALive 5741 Wealthy Family
    HDU 3452 Bonsai
    HDU 3586 Information Disturbing
  • 原文地址:https://www.cnblogs.com/ElegantSmile/p/12588779.html
Copyright © 2011-2022 走看看