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

  • 相关阅读:
    Ubuntu16.04下同时安装Anaconda2与Anaconda3
    ansible 常用模块
    docker 笔记 (7) 限制容器
    linux 磁盘
    docker 笔记 (6)搭建本地registry
    docker 笔记 (5)常用命令
    docker 笔记(4) Dockerfile 常用的指令
    NGINX下配置CACHE-CONTROL
    mysql二进制安装
    [Selenium] Explicit wait 方法
  • 原文地址:https://www.cnblogs.com/ElegantSmile/p/12588779.html
Copyright © 2011-2022 走看看