当前位置:网站首页>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
边栏推荐
- February 13, 2022-2-climbing stairs
- 记某公司面试算法题:查找一个有序数组某个数字出现的次数
- [BMZCTF-pwn] 12-csaw-ctf-2016-quals hungman
- windows下同时安装mysql5.5和mysql8.0
- MySQL 20 MySQL data directory
- MySQL21-用户与权限管理
- Global and Chinese market for intravenous catheter sets and accessories 2022-2028: Research Report on technology, participants, trends, market size and share
- Ansible实战系列二 _ Playbook入门
- SSM integrated notes easy to understand version
- CSDN Q & a tag skill tree (V) -- cloud native skill tree
猜你喜欢
Swagger, Yapi interface management service_ SE
Did you forget to register or load this tag 报错解决方法
Mysql26 use of performance analysis tools
35 is not a stumbling block in the career of programmers
windows无法启动MYSQL服务(位于本地计算机)错误1067进程意外终止
MySQL23-存儲引擎
Water and rain condition monitoring reservoir water and rain condition online monitoring
Asp access Shaoxing tourism graduation design website
La table d'exportation Navicat génère un fichier PDM
[Thesis Writing] how to write function description of jsp online examination system
随机推荐
Detailed reading of stereo r-cnn paper -- Experiment: detailed explanation and result analysis
记一次某公司面试题:合并有序数组
February 13, 2022-3-middle order traversal of binary tree
Postman Interface Association
MySQL23-存储引擎
Kubernetes - problems and Solutions
报错解决 —— io.UnsupportedOperation: can‘t do nonzero end-relative seeks
CSDN question and answer module Title Recommendation task (II) -- effect optimization
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
MySQL26-性能分析工具的使用
MySQL22-逻辑架构
[free setup] asp Net online course selection system design and Implementation (source code +lunwen)
软件测试-面试题分享
Have you mastered the correct posture of golden three silver four job hopping?
API learning of OpenGL (2001) gltexgen
[untitled]
Invalid default value for 'create appears when importing SQL_ Time 'error reporting solution
Postman environment variable settings
Other new features of mysql18-mysql8
安全测试涉及的测试对象