当前位置:网站首页>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
边栏推荐
- Some notes of MySQL
- CSDN markdown editor
- CSDN问答标签技能树(五) —— 云原生技能树
- Ansible practical Series II_ Getting started with Playbook
- CSDN博文摘要(一) —— 一个简单的初版实现
- Mysql23 storage engine
- FRP intranet penetration
- 【博主推荐】C#MVC列表实现增删改查导入导出曲线功能(附源码)
- Mysql34 other database logs
- Copy constructor template and copy assignment operator template
猜你喜欢
MySQL26-性能分析工具的使用
MySQL主从复制、读写分离
CSDN Q & a tag skill tree (V) -- cloud native skill tree
【博主推荐】C#MVC列表实现增删改查导入导出曲线功能(附源码)
CSDN博文摘要(一) —— 一个简单的初版实现
Copie maître - esclave MySQL, séparation lecture - écriture
MySQL23-存儲引擎
A trip to Macao - > see the world from a non line city to Macao
How to change php INI file supports PDO abstraction layer
Generate PDM file from Navicat export table
随机推荐
Mysql33 multi version concurrency control
MySQL21-用戶與權限管理
Moteur de stockage mysql23
Yum prompt another app is currently holding the yum lock; waiting for it to exit...
MySQL other hosts cannot connect to the local database
Database middleware_ MYCAT summary
@Controller, @service, @repository, @component differences
Ansible实战系列二 _ Playbook入门
CSDN Q & a tag skill tree (V) -- cloud native skill tree
LeetCode #461 汉明距离
Navicat 導出錶生成PDM文件
【博主推荐】SSM框架的后台管理系统(附源码)
Breadth first search rotten orange
TCP/IP协议(UDP)
C language advanced pointer Full Version (array pointer, pointer array discrimination, function pointer)
Mysql21 - gestion des utilisateurs et des droits
Solve the problem that XML, YML and properties file configurations cannot be scanned
MySQL18-MySQL8其它新特性
01项目需求分析 (点餐系统)
导入 SQL 时出现 Invalid default value for ‘create_time‘ 报错解决方法