ping serverd 是否ping通
登录workstation
[kiosk@foundation0 ~]$ ssh student@workstation
Warning: Permanently added 'workstation,172.25.250.9' (ECDSA) to the list of known hosts.
Activate the web console with: systemctl enable --now cockpit.socket
启动脚本配置控制节点
[student@workstation ~]$ lab intro-install start
Setting up the environment for the exercise:
· Configuring control node packages........................... SUCCESS
在workstation上安装ansible,使它可以充当控制节点
[student@workstation ~]$ sudo yum install ansible
验证系统上是否安装了ansible
[student@workstation ~]$ ansible --version
使用setup模块验证localhost上的ansible_python_version
[student@workstation ~]$ ansible -m setup localhost | grep ansible_python_version
"ansible_python_version": "3.6.8",
完成
运行lab intro-install finish脚本来清理本练习
[student@workstation ~]$ lab intro-install finish
Cleaning up environment:
. Cleaning up................................................. SUCCESS
总结:
1、自动化是减少人为错误并快速去报IT 基础架构处于一致且正确的状态的关键工具
2、ansible是一种开源自动化平台,能够适应许多不同的工作流和环境
3、ansible 可用于管理许都不同类型的系统,包括运行linux、Microsoft Windows 或Unix 的服务器以及网络设备
4、ansible playbook 是人类可读的文本文件,用于描述IT基础架构的所需状态
5、ansible 围绕一种无代理架构构建,在控制节点上安装ansible ,且客户端不需要任何代理软件
6、ansible 使用SSH 等标准协议连接受管主机,并在受管主机上运行代码或命令来确保它们处于ansible指定的状态