当前位置:网站首页>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
边栏推荐
- C language string function summary
- [C language foundation] 04 judgment and circulation
- [recommended by bloggers] asp Net WebService background data API JSON (with source code)
- Invalid global search in idea/pychar, etc. (win10)
- February 13, 2022-2-climbing stairs
- Global and Chinese market of operational amplifier 2022-2028: Research Report on technology, participants, trends, market size and share
- 02-项目实战之后台员工信息管理
- Just remember Balabala
- MySQL22-逻辑架构
- Mysql 其他主机无法连接本地数据库
猜你喜欢

MySQL22-逻辑架构

一键提取pdf中的表格

Navicat 導出錶生成PDM文件
![[recommended by bloggers] background management system of SSM framework (with source code)](/img/7f/a6b7a8663a2e410520df75fed368e2.png)
[recommended by bloggers] background management system of SSM framework (with source code)

【博主推荐】asp.net WebService 后台数据API JSON(附源码)

Mysql33 multi version concurrency control

Some problems in the development of unity3d upgraded 2020 VR

Swagger, Yapi interface management service_ SE

MySQL21-用戶與權限管理

Mysql21 user and permission management
随机推荐
Remember the interview algorithm of a company: find the number of times a number appears in an ordered array
Are you monitored by the company for sending resumes and logging in to job search websites? Deeply convinced that the product of "behavior awareness system ba" has not been retrieved on the official w
虚拟机Ping通主机,主机Ping不通虚拟机
Csdn-nlp: difficulty level classification of blog posts based on skill tree and weak supervised learning (I)
MySQL23-存儲引擎
CSDN问答模块标题推荐任务(二) —— 效果优化
February 13, 2022-3-middle order traversal of binary tree
Breadth first search rotten orange
MySQL26-性能分析工具的使用
MySQL20-MySQL的数据目录
Global and Chinese markets of static transfer switches (STS) 2022-2028: Research Report on technology, participants, trends, market size and share
记一次某公司面试题:合并有序数组
Global and Chinese market of wafer processing robots 2022-2028: Research Report on technology, participants, trends, market size and share
JDBC原理
01项目需求分析 (点餐系统)
MySQL flush operation
Postman Interface Association
Swagger、Yapi接口管理服务_SE
[Thesis Writing] how to write function description of jsp online examination system
[recommended by bloggers] C WinForm regularly sends email (with source code)