关于ansbile工具的shell、command、script、raw模块的区别和使用场景
command模块 [执行远程命令]
[root@node1 ansible]# ansible testservers -m command -a 'uname -n'
script模块 [在远程主机执行主控端的shell/python脚本 ] (使用相对路径)
[root@node1 ansible]# ansible testservers -m script -a '/etc/ansible/test.sh
shell模块 [执行远程主机的shell/python脚本]
[root@node1 ansible]# ansible testservers -m shell -a 'bash /root/test.sh'
raw模块 [类似于command模块、支持管道传递]
[root@node1 ansible]# ansible testservers -m raw -a "ifconfig eth0 |sed -n 2p |awk '{print \$2}' |awk -F: '{print \$2}'"
关于ansbile工具的shell、command、script、raw模块的区别和使用场景的更多相关文章
- 生产力工具:shell 与 Bash 脚本
生产力工具:shell 与 Bash 脚本 作者:吴甜甜 个人博客网站: wutiantian.github.io 注意:本文只是我个人总结的学习笔记,不适合0基础人士观看. 参考内容: 王顶老师 l ...
- Jenkins--Run shell command in jenkins as root user?
You need to modify the permission for jenkins user so that you can run the shell commands. You can i ...
- learning shell get script absolute path (3)
Shell get script absolute path [Purpose] Get shell script absolute path [Eevironment] ...
- LogStash启动报错:<Redis::CommandError: ERR unknown command 'script'>与batch_count 的 配置
环境条件: 系统版本:centos 6.8 logstash版本:6.3.2 redis版本:2.4 logstash input配置: input { redis { host => &qu ...
- 简单的自动化运维工具(shell+except+whiptail+功能模块化函数+循环)
简单的自动化运维工具(shell+except+whiptail+功能模块化函数+循环) http://www.cnblogs.com/M18-BlankBox/p/5881700.html
- ionic打包apkFailed to execute shell command "input,keyevent,82"" on device: Error: adb: Command failed with exit code 137
错误代码如下 BUILD SUCCESSFUL in 12s 46 actionable tasks: 1 executed, 45 up-to-date Built the following ap ...
- I.MX6 Android shutdown shell command
/******************************************************************************* * I.MX6 Android shu ...
- Makefile,Shell command,Shell Language 之间的联系
1. Makefile 首先要知道Makefile 是什么东西,Makefile 是一个指令文件,里面存储着自定义的命令(可以借助已有的命令创造而来)在不同的系统下对Makefile 的区别不一样,L ...
- [日期工具分享][Shell]为特定命令依次传入顺序日期执行
[日期工具分享][Shell]为特定命令依次传入顺序日期执行 使用方式: <本脚本文件名(必要时需要全路径)> <要执行的命令所在的文件名> <开始日期> < ...
随机推荐
- web前端开发,如何提高页面性能优化?
内容方面: 1.减少 HTTP 请求 (Make Fewer HTTP Requests) 2.减少 DOM 元素数量 (Reduce the Number of DOM Elements) 3.使得 ...
- 一个简单的 JSON 生成/解析库
这是一个单文件的,适用于C语言的, JSON 读写库. 先说明,不想造轮子,代码是从这里拿来的: https://www.codeproject.com/Articles/887604/jWrite- ...
- C/C++中extern关键字详解(转)
1 基本解释:extern可以置于变量或者函数前,以标示变量或者函数的定义在别的文件中,提示编译器遇到此变量和函数时在其他模块中寻找其定义.此外extern也可用来进行链接指定. 也就是说extern ...
- merge-two-sorted-lists合并链表
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing t ...
- PCI(Payment Card Industry)合规
PCI-DSS(Payment Card Industry-Data Security Standard) 1.构建并维护安全的网络 2.保护持卡人数据 3.维护漏洞管理程序 4.执行严格的访问控制 ...
- java 第一个java程序
public class Test16{ public static void main( String args[] ) { System.out.println ("welcome to ...
- SSM框架中,配置数据库连接的问题
MySQL数据库版本是8.0.11. 要用驱动:com.mysql.cj.jdbc.Driver 最主要的是数据库的连接url. 搞了半天才把问题搞明白: 数据库url后面要加上参数: jdbc:my ...
- Tomcat默认界面可导致版本信息泄露+管理后台爆破
由于配置的Tomcat时,管理页面未进行删除或者权限角色配置,攻击者可以通过暴力猜解进入到管理后台,从而上传获取shell. Tomcat的默认工具manager配置,在很多的生产环境中由于基本用不到 ...
- weblogic启动报错|unable to create new native threadjava
问题描述: <-- 上午10时20分01秒 CST> <Critical> <WebLogicServer> <BEA-> <Server sub ...
- Oracle用分区表分区交换做历史数据迁移
一. 说明: OLTP库中有些表数据量大,且每月有持续的大量数据添加.因为历史数据在此库中不再做訪问,而是在另1个OLAP库中做分析.所以会对历史数据迁移至OLAP库中.对这样的历史数据迁移的操作.较 ...