ansible shell模块
[root@ftp:/root]
> ansible ansible01 -u root -k -m shell -a 'hostname'
SSH password:
ansible01 | CHANGED | rc=0 >>
ansible01
[root@ftp:/root]
> ansible ansible01 -u root -k -m shell -a 'uptime'
SSH password:
ansible01 | CHANGED | rc=0 >>
16:11:53 up 2:49, 2 users, load average: 0.00, 0.01, 0.05
[root@ftp:/root]
> ansible ansible01 -u root -k -m shell -a 'free -m'
SSH password:
ansible01 | CHANGED | rc=0 >>
total used free shared buff/cache available
Mem: 1839 119 1259 8 460 1525
Swap: 1023 0 1023
ansible shell模块的更多相关文章
- Ansible 常用模块(一)
一.Ansible简介 Ansible是新出现的自动化运维工具,基于python开发,集合了众多运维工具(puppet(ruby).cfengine.chef.func.fabric.)的优点,实现了 ...
- ansible shell 之运行后台程序
最近在使用ansible shell模块启动一个shell编写的脚本,该脚本主要功能式加载java的classpath并在后台运行这个java程序. 该脚本在linux shell中可以正常启动和停止 ...
- 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 ...
- ansible使用shell模块在受控机上执行命令(ansible2.9.5)
一,ansible的shell模块和command模块的区别? shell模块:在远程主机上执行主控端发出的shell/python脚本 command模块:不能调用shell指令,没有bash的环境 ...
- ansible常见模块
模块的使用 查看模块帮助 ansible-doc -l 查看所有模块 ansible-doc -s MODULE_NAME 查看指定模块的详细帮助 ansible命令应用基础 语法: ansible ...
- ansible常用模块入门
常用模块有以下几个 command copy shell crond yum service setup 1.command模块 ansible george -m command -a " ...
- Linux之ansible 常用模块
目的 代码发布系统 代码发布:把本地的代码通过某些方式弄到线上,可以供别人访问 部署 前戏 ansible 批量在远程主机上执行命令 puppet ruby ansible saltstack pyt ...
- Ansible常用模块介绍及使用(week5_day1_part2)--技术流ken
Ansible模块 在上一篇博客<Ansible基础认识及安装使用详解(一)--技术流ken>中以及简单的介绍了一下ansible的模块.ansible是基于模块工作的,所以我们必须掌握几 ...
- ansible的模块使用说明
参考官方链接: https://docs.ansible.com/ansible/latest/user_guide/intro_adhoc.html#parallelism-and-shell-co ...
随机推荐
- 用于检测进程的shell脚本
用于检测进程的shell脚本 2010-07-07 10:38:08| 分类: Centos |字号 订阅 脚本一: #!/bin/sh program=XXXX #进程名 sn=`ps - ...
- jenkins 自动化部署
Execute shell Command BUILD_ID=DONTKILLMEif [ ! -d "/usr/jenkins/$JOB_NAME" ]; then mkdir ...
- CF369E. ZS and The Birthday Paradox
/* cf369E. ZS and The Birthday Paradox http://codeforces.com/contest/711/problem/E 抽屉原理+快速幂+逆元+勒让德定理 ...
- tomat遇到的一些错误
资料链接:启动tomcat一闪而过的问题
- SQL Server loop - how do I loop through a set of records
SQL Server loop - how do I loop through a set of records By using T-SQL and cursors like this : DECL ...
- html 中表单元素input type="hidden"的作用
转自:https://blog.csdn.net/xiaobing_122613/article/details/54946559 (隐藏只是在网页页面上面不显示输入框,但是虽然隐藏了,还是具有for ...
- ubuntu下无法将iNode绑定到侧边栏的解决办法
title: ubuntu下无法将iNode绑定到侧边栏的解决办法 toc: false date: 2018-09-01 17:43:52 categories: methods tags: ubu ...
- 17. Letter Combinations of a Phone Number[M]电话号码的字母组合
题目 Given a string containing digits from 2-9 inclusive, return all possible letter combinations that ...
- POJ 1128 Frame Stacking 拓扑排序+暴搜
这道题输出特别坑.... 题目的意思也不太好理解.. 就解释一下输出吧.. 它让你 从下往上输出. 如果有多种情况,按照字典序从小往大输出... 就是这个多种情况是怎么产生的呢. 下面给一组样例. 很 ...
- C++之易混淆知识点五
一.解析类继承中父类与子类之间成员的访问可见度: 外部可见度:指的是被子类继承的父类成员在子类的外部访问控制度,有protected.public.private. 内部可见度:指的是被子类继承的父类 ...