安装Ansible到CentOS(YUM)
运行环境
系统版本:CentOS Linux release 7.3.1611 (Core)
软件版本:ansible
硬件要求:无
安装过程
1、安装YUM-EPEL源
HTTP-Tools软件包由YUM-EPEL源提供。
[root@localhost ~]# yum -y install epel-release.noarch
2、安装Ansible
[root@localhost ~]# yum -y install ansible
3、配置管理主机与节点主机的SSH免密登录
[root@localhost ~]# ssh-keygen => 管理主机生成SSH公私钥文件
Your identification has been saved in /root/.ssh/id_rsa. # 私钥文件保存路径
Your public key has been saved in /root/.ssh/id_rsa.pub. # 公钥文件保存路径
[root@localhost ~]# ssh-copy-id 192.168.1.33 => 将生成的公钥拷贝到节点主机的公钥存储库中
[root@localhost ~]# ssh-copy-id 192.168.1.46
[root@localhost ~]# ssh-copy-id 192.168.1.50
[root@localhost ~]# cat /root/.ssh/authorized_keys => 查看节点主机的公钥存储库
4、简单的使用Ansible,我们需要先配置一个节点主机组
[root@localhost ~]# vi /etc/ansible/hosts
# 主机组,定义一组节点主机,"[ ]"表示组名
[webservers]
192.168.1.33
192.168.1.46
192.168.1.50
5、我们使用Ping模块测试一下节点主机网络通信情况
[root@localhost ~]# ansible webservers -m ping -f 10 => "-f"表示开启的并发进程数
# "SUCCESS"说明网络通信正常
192.168.1.46 | SUCCESS => {
"changed": false,
"ping": "pong"
}
安装Ansible到CentOS(YUM)的更多相关文章
- Ejabberd2:安装和操作指南(centos yum 安装ejabberd)
(1)首先安装EPEL Repository ## RHEL/CentOS 6 32-Bit ## # wget http://download.fedoraproject.org/pub/ ...
- centos下安装ansible自动化工具(超详细,包含基本使用)
ansible官网:https://www.ansible.com 众所周知,ansible是新出现的自动化运维工具,基于Python开发,集合了众多运维工具(puppet.cfengine.chef ...
- Centos7安装ansible
CentOS下部署Ansible自动化工具 1.确保机器上安装的是 Python 2.6 或者 Python 2.7 版本: python -V 2.查看yum仓库中是否存在ansible的rpm包 ...
- centos7下安装ansible
由于centos7预装了python,因此我们可以跳过python的安装环节(记得关闭防火墙) [root@model ~]# [root@model ~]# python --version Pyt ...
- Centos 安装yum,安装ansible
今天使用centos安装ansible,发现域名默认安装是未注册的.提示: This system is not registered to Red Hat Subscription Manageme ...
- CentOS 8 Yum安装ansible
ansible的安装 直接yum安装ansible会报错,需要先安装epel源. ansible的安装来源于epel仓库,因此在安装前需确保安装了正确的epel源. yum install -y ep ...
- ansible笔记(1)在centos中安装ansible
ansible笔记():ansible的基本概念 一些基础概念 ansible是什么? 它是一个"配置管理工具",它是一个"自动化运维工具",如果你没有使用过任 ...
- CentOS 7安装Ansible
在CentOS下安装Ansible非常的简单,但需要注意一下几点: 1.为了简单建议使用yum的epel源安装,毕竟没什么模块需要自己定制的,如果非要指定版本,可以指定不同的版本,下面会讲. 2.母机 ...
- 通过自制yum源离线安装ansible
系统环境 --CentOS release 7 python版本--Python 3.5.4 背景:在企业环境中,安装ansible的服务器往往不能访问互联网,简单的下载ansible源码安装,会 ...
随机推荐
- Ubuntu18 永久设置分辨率1920x1080
起因 虚拟机(virtualBox)中设置 1920*1080 的分辨率后, 每次重启后都会回到默认,永久设置的方式如下 步骤: 添加系统设置 sudo xrandr --newmode " ...
- pytorch --- word2vec 实现 --《Efficient Estimation of Word Representations in Vector Space》
论文来自Mikolov等人的<Efficient Estimation of Word Representations in Vector Space> 论文地址: 66666 论文介绍了 ...
- zookeeper从入门到放弃
第1章 Zookeeper入门 1.1 概述 Zookeeper是一个开源的分布式的,为分布式应用提供协调服务的Apache项目. 1.2 特点 1.3 数据结构 1.4 应用场景 提供的服务包括:统 ...
- numpy 介绍与使用
一.介绍 中文文档:https://www.numpy.org.cn/ NumPy是Python语言的一个扩展包.支持多维数组与矩阵运算,此外也针对数组运算提供大量的数学函数库.NumPy提供了与Ma ...
- centos6.5和centos7.5统一字符集为zh_CN.UTF-8解决系统和MySQL数据库乱码问题
linux的服务器需要做的操作 centos6.5下: 修改默认字符集为 zh_CN.UTF-8,如果没有中文语言包可能需要安装中文语言包支持 [root@meinv01 ~]# yum groupi ...
- centos容器yum安装JDK环境
1.yum命令安装jdk 选择版本安装 -openjdk java--openjdk-devel 或者如下命令,安装jdk1.8.0的所有文件 -openjdk*yum install -y java ...
- codewars--js--Simple string expansion+ repeat(),includes()方法
问题描述: Consider the following expansion: solve("3(ab)") = "ababab" -- "ab&qu ...
- 少量代码设计一个登录界面(二) – .NET CORE(C#) WPF开发
微信公众号:Dotnet9,网站:Dotnet9,问题或建议:请网站留言, 如果对您有所帮助:欢迎赞赏. 阅读导航 本文背景 代码实现 本文参考 源码 1. 本文背景 同上篇文章<少量代码设计一 ...
- Ream--(objc)写事务精简方案
Ream--(objc)写事务精简方案 地址: REALM-- Realm官方提供的的写事务有两种方式: A[realm beginWriteTransaction]; // ... [realm c ...
- Sql Server Proc 先看看简单吧
CREATE PRoc [名字] { @参数 数据类型, @参数 数据类型 OUTPUT[输入] } AS begin select INSERT UPDATE (SQL) end --基本语句快 - ...