当前位置:网站首页>Ansible practical series I_ introduction
Ansible practical series I_ introduction
2022-07-06 11:01:00 【hyh123a】
Preface
A need : Need to operate on multiple hosts .
ok frank , It's actually for the use of kubespray Deploy kubernetes Do matting
Environmental Science
Ubuntu 20.04
1、 install
sudo apt install ansible
2、 Generate configuration ssh Secret key
ssh-keygen
ssh-copy-id [email protected]
ssh-copy-id [email protected]
ssh-copy-id [email protected]
3、 Example
sudo nano /etc/ansible/hosts
Revised as follows Define user name and password Not set up The default user name is root
[web]
172.16.106.20 ansible_ssh_user='ubuntu20' ansible_ssh_pass='AAbb0101'
172.16.106.21 ansible_ssh_user='ubuntu20' ansible_ssh_pass='AAbb0101'
172.16.106.22 ansible_ssh_user='ubuntu20' ansible_ssh_pass='AAbb0101'
ansible web -m command -a 'uptime'
Output is as follows
172.16.106.20 | CHANGED | rc=0 >>
10:11:57 up 17 days, 5:13, 3 users, load average: 0.47, 0.77, 1.21
172.16.106.22 | CHANGED | rc=0 >>
10:11:57 up 17 days, 6:08, 1 user, load average: 1.34, 1.13, 1.25
172.16.106.21 | CHANGED | rc=0 >>
10:11:57 up 17 days, 5:45, 1 user, load average: 1.44, 1.92, 1.99
other
If there is any omission, please add
If you have any questions, please leave a message
If it works, please like it
边栏推荐
- Swagger, Yapi interface management service_ SE
- Invalid default value for 'create appears when importing SQL_ Time 'error reporting solution
- API learning of OpenGL (2001) gltexgen
- Mysql22 logical architecture
- SSM整合笔记通俗易懂版
- There are three iPhone se 2022 models in the Eurasian Economic Commission database
- [recommended by bloggers] C WinForm regularly sends email (with source code)
- 【博主推荐】C# Winform定时发送邮箱(附源码)
- 导入 SQL 时出现 Invalid default value for ‘create_time‘ 报错解决方法
- A brief introduction to the microservice technology stack, the introduction and use of Eureka and ribbon
猜你喜欢

API learning of OpenGL (2002) smooth flat of glsl

Redis的基础使用
![[free setup] asp Net online course selection system design and Implementation (source code +lunwen)](/img/ac/b518796a92d00615cd374c0c835f38.jpg)
[free setup] asp Net online course selection system design and Implementation (source code +lunwen)

Database middleware_ MYCAT summary

A brief introduction to the microservice technology stack, the introduction and use of Eureka and ribbon

Swagger、Yapi接口管理服务_SE

Navicat 导出表生成PDM文件

CSDN Q & a tag skill tree (V) -- cloud native skill tree
![[Li Kou 387] the first unique character in the string](/img/2d/f2c99549cac86c08efbfbd8ba76427.jpg)
[Li Kou 387] the first unique character in the string

Django运行报错:Error loading MySQLdb module解决方法
随机推荐
CSDN问答标签技能树(一) —— 基本框架的构建
A brief introduction to the microservice technology stack, the introduction and use of Eureka and ribbon
[C language foundation] 04 judgment and circulation
Kubernetes - problems and Solutions
CSDN question and answer module Title Recommendation task (II) -- effect optimization
记某公司面试算法题:查找一个有序数组某个数字出现的次数
++Implementation of I and i++
Mysql33 multi version concurrency control
Solve the problem that XML, YML and properties file configurations cannot be scanned
Ansible practical Series II_ Getting started with Playbook
Windows cannot start the MySQL service (located on the local computer) error 1067 the process terminated unexpectedly
[paper reading notes] - cryptographic analysis of short RSA secret exponents
Valentine's Day is coming, are you still worried about eating dog food? Teach you to make a confession wall hand in hand. Express your love to the person you want
Armv8-a programming guide MMU (2)
Esp8266 at+cipstart= "", "", 8080 error closed ultimate solution
API learning of OpenGL (2003) gl_ TEXTURE_ WRAP_ S GL_ TEXTURE_ WRAP_ T
CSDN question and answer module Title Recommendation task (I) -- Construction of basic framework
C语言标准的发展
【博主推荐】C# Winform定时发送邮箱(附源码)
MySQL flush operation