[root@yx01 site-packages]
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit
localhost does not match 'all'
/usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.3) or chardet (2.2.1) doesn't match a supported version!
RequestsDependencyWarning)
显示urllib3 (1.25.3) or chardet (2.2.1)版本不匹配
使用pip命令删除库
pip uninstall urllib3
pip uninstall chardet
但是还是报相同的错误
在依赖库的目录/usr/lib/python2.7/site-packages/
下发现还是有其它版本的urllib3和chardet

手动删除后再使用ansible all -m ping
可以成功

报错提示[root@yx01 site-packages]# ansible all -m ping[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicitlocalhost does not match 'all'/usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarn
Ansible对于企业运维的重大意义
Ansible是一个简单高效的自动化运维管理工具,能大批量管理N多台机器,可以并发的在多台机器上部署应用、安装软件、执行命令、配置和编排任务。
ansible的安装
*Ansible是一个插件,不用启动任何服务
epel源 ##下载epel源的rpm安装包
wget 安装包...
[root@m01 ~]# ansible servers -a "hostname"
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit
localhost does not match 'all'
日志没有找到可供参考的解决方法,在查看sshd服务的状态的时候,发现如下问题,/home/westos权限可能存在问题
当修改了/home/westos的权限时,sshd服务的状态在查看的时候报错消失
ansible 172.25.254.120 -m ping 成功
1: 因为本人的linux yum 安装ansible 有问题,就开始利用source code 来安装: www.python.org 下载--> download --> source code --> python3.7.3 --> Gzipped Source tar ball
2: 下载后 tar -zxvf python3.7.3.tgz, 解压后: ./co...
获取目标机器的分区情况: post/windwos/gather/forensics/enum_drives
判断是否为虚拟机 post/windows/gather/checkvm
开启了哪些服务 :post/windwos/gather/enum_services
安装了哪些应用: post/windows/gather/enum_applications
查看共享: post/windows/gather/enum_shares
获取主机最近的系统操作: post/windows/gathe
文章目录Ansible学习笔记1. 环境准备1.1 *节点配置*1.2 *Ansible安装*1.3 *节点通信*1.4 *VS Code*1.5 *其他依赖*2. Ansible学习2.1.1 *开始*2.1.2 *连通性测试*2.1.3 *合理利用hosts*2.1.4 *SSH免密*
Ansible学习笔记
背景:在构建了三个节点组成的集群之后,我们需要进行工具的部署,这里选择自动化工具Ansible。
推荐学习bilibili上的Ansible课程,链接如下:
Reference: https:/
ansible all -m ping
这个命令将向所有主机发送ping请求,并返回每个主机的响应结果。如果主机能够正常响应,则表示连通性良好。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [ansible总结](https://blog.csdn.net/qq_42000421/article/details/120120982)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]