[Errno 2] No such file or directory
Centos7.5 执行ansible命令报错
问题:
[root@m01 ~]# ansible servers -a "hostname|grep web" -i ./hosts
172.16.1.7 | FAILED | rc=2 >>
[Errno 2] No such file or directory
原因:
默认使用的是command模块,command模块不能使用管道
解决方法:
使用shell模块执行命令
[root@m01 ~]# ansible servers -m shell -a "hostname|grep web" -i ./hosts
172.16.1.7 | CHANGED | rc=0 >>
web01
[Errno 2] No such file or directory的更多相关文章
- RHEL 5.7 Yum配置本地源[Errno 2] No such file or directory
在Red Hat Enterprise Linux Server release 5.7 上配置YUM本地源时,遇到了"Errno 5] OSError: [Errno 2] No such ...
- VSCode python 遇到的问题:vscode can't open file '<unprintable file name>': [Errno 2] No such file or directory
代码很简单,就两行: import pandas as pd import netCDF4 as nc dataset = nc.Dataset('20150101.nc') 环境:在VSCode中左 ...
- can't open file 'manage.py': [Errno 2] No such file or directory
python Django创建数据库时can't open file 'manage.py': [Errno 2] No such file or directory 参考https://blog.c ...
- ansible执行shell模块和command模块报错| FAILED | rc=127 >> /bin/sh: lsof: command not found和| rc=2 >> [Errno 2] No such file or directory
命令: ansible -i hosts_20 st -m shell -a 'service zabbix_agentd star' -K --become ansible -i hosts_2 ...
- 关于python中的 “ FileNotFoundError: [Errno 2] No such file or directory: '……'问题 ”
今天在学python时,在模仿一个为图片加上图标并移动到指定文件夹的程序时遇到“FileNotFoundError: [Errno 2] No such file or directory: '152 ...
- python文件操作的坑( FileNotFoundError: [Errno 2] No such file or directory...)
环境:Windows8.1, Python3.6 pycharm community 2017 c盘下有一个配置文件:setup with open('c:\\setup','r') as ...
- os.chdir("/deepmatching") OSError: [Errno 2] No such file or directory: '/deepmatching'
#os.chdir("/deepmatching")os.chdir(os.path.dirname(os.path.abspath("deepmatching1&quo ...
- Docker build 安装报错, Could not open requirments file: [Errno 2] No such file or directory:'requirements.txt'
docker安装教程 https://docs.docker.com/get-started/part2/#build-the-app 相关帖子 https://stackoverflow.com/q ...
- py2exe error: [Errno 2] No such file or directory: 'MSVCP90.dll'
使用 python setup.py py2exe 打包时出现 py2exe error: [Errno 2] No such file or directory: 'MSVCP90.dll' 解决方 ...
随机推荐
- gulp打包公共部分
安装gulp cnpm install gulp -g 输入gulp -v看到版本号说明安装成功了 安装gulp-file-include:npm install gulp-file-include ...
- C++调用openssl库生成RSA加密秘钥对
直接上代码.默认生成的是pkcs#1格式 // ---- rsa非对称加解密 ---- // #define KEY_LENGTH 1024 // 密钥长度 #define PUB_KEY_FILE ...
- Spring.之.jar包官网下载
jar包官网下载 1. 官网下载网址:http://repo.spring.io/libs-release 2. 用到的jar包所在路径:org/springframework/spring/ ,在此 ...
- javascript获取style兼容性问题
获取css 样式的方法有三种 : style, currentStyle , getComputedStyle style (无兼容性问题) 获取语法: ele.style.attr : 设置语法:e ...
- spark sql01
package sql; import org.apache.spark.SparkConf; import org.apache.spark.api.java.JavaSparkContext; i ...
- netcore swagger xml发布丢失问题
1.netcore2.1.2,swagger.aspnetcore 1.1.0版本.发布netcore项目时swagger的接口文档xml 遗漏,始终发布不上去.后来查阅资料,讲的好像是netcore ...
- C# Activator和new的区别
1.你需要动态的创建一个实例模型的时候,就用Activator.CreateInstance(Type type);如果是明确的知道要创建哪个实例的模型,就可以用 new Class1()了. T t ...
- jQuery事件--change([[data],fn])、on(events,[selector],[data],fn)和hover([over,]out)
change([[data],fn]) 概述 当元素的值发生改变时,会发生 change 事件. 该事件仅适用于文本域(text field),以及 textarea 和 select 元素.当用于 ...
- SpringMVC七种参数绑定简单介绍
a. 默认支持的类型: httpServletRequest, httpservletresponse, httpsession, model 看自己需要, 如果需要用就加 ...
- Linux基础命令---管理组gpasswd
gpasswd gpasswd指令用来管理组文件“/etc/group”和“/etc/gshadow”,每个组可以设置管理员.组员.密码.系统管理员可以使用-A选项定义组管理员,使用-M选项定义成员. ...