当前位置:网站首页>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
边栏推荐
- 导入 SQL 时出现 Invalid default value for ‘create_time‘ 报错解决方法
- 【博主推荐】asp.net WebService 后台数据API JSON(附源码)
- Opencv uses freetype to display Chinese
- Postman Interface Association
- Deoldify项目问题——OMP:Error#15:Initializing libiomp5md.dll,but found libiomp5md.dll already initialized.
- MySQL19-Linux下MySQL的安装与使用
- Just remember Balabala
- 【博主推荐】SSM框架的后台管理系统(附源码)
- Global and Chinese market of transfer switches 2022-2028: Research Report on technology, participants, trends, market size and share
- MySQL18-MySQL8其它新特性
猜你喜欢

csdn-Markdown编辑器

【博主推荐】SSM框架的后台管理系统(附源码)

【博主推荐】C# Winform定时发送邮箱(附源码)

MySQL 20 MySQL data directory

Installation and use of MySQL under MySQL 19 Linux
![[reading notes] rewards efficient and privacy preserving federated deep learning](/img/c3/5e88277b5024885d5ceeaa0de14b27.jpg)
[reading notes] rewards efficient and privacy preserving federated deep learning

Navicat 导出表生成PDM文件

MySQL22-逻辑架构
![[Li Kou 387] the first unique character in the string](/img/2d/f2c99549cac86c08efbfbd8ba76427.jpg)
[Li Kou 387] the first unique character in the string

CSDN问答模块标题推荐任务(二) —— 效果优化
随机推荐
MySQL的一些随笔记录
MySQL26-性能分析工具的使用
[Li Kou 387] the first unique character in the string
Database middleware_ MYCAT summary
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
Django运行报错:Error loading MySQLdb module解决方法
[recommended by bloggers] asp Net WebService background data API JSON (with source code)
Global and Chinese market of operational amplifier 2022-2028: Research Report on technology, participants, trends, market size and share
Install MySQL for Ubuntu 20.04
Kubernetes - problems and Solutions
35 is not a stumbling block in the career of programmers
Postman environment variable settings
Asp access Shaoxing tourism graduation design website
MySQL主從複制、讀寫分離
[paper reading notes] - cryptographic analysis of short RSA secret exponents
Kubesphere - deploy the actual combat with the deployment file (3)
C language advanced pointer Full Version (array pointer, pointer array discrimination, function pointer)
How to change php INI file supports PDO abstraction layer
[reading notes] rewards efficient and privacy preserving federated deep learning
JDBC原理