[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模块的更多相关文章

  1. Ansible 常用模块(一)

    一.Ansible简介 Ansible是新出现的自动化运维工具,基于python开发,集合了众多运维工具(puppet(ruby).cfengine.chef.func.fabric.)的优点,实现了 ...

  2. ansible shell 之运行后台程序

    最近在使用ansible shell模块启动一个shell编写的脚本,该脚本主要功能式加载java的classpath并在后台运行这个java程序. 该脚本在linux shell中可以正常启动和停止 ...

  3. 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 ...

  4. ansible使用shell模块在受控机上执行命令(ansible2.9.5)

    一,ansible的shell模块和command模块的区别? shell模块:在远程主机上执行主控端发出的shell/python脚本 command模块:不能调用shell指令,没有bash的环境 ...

  5. ansible常见模块

    模块的使用 查看模块帮助 ansible-doc -l 查看所有模块 ansible-doc -s MODULE_NAME 查看指定模块的详细帮助 ansible命令应用基础 语法: ansible ...

  6. ansible常用模块入门

    常用模块有以下几个 command copy shell crond yum service setup 1.command模块 ansible george -m command -a " ...

  7. Linux之ansible 常用模块

    目的 代码发布系统 代码发布:把本地的代码通过某些方式弄到线上,可以供别人访问 部署 前戏 ansible 批量在远程主机上执行命令 puppet ruby ansible saltstack pyt ...

  8. Ansible常用模块介绍及使用(week5_day1_part2)--技术流ken

    Ansible模块 在上一篇博客<Ansible基础认识及安装使用详解(一)--技术流ken>中以及简单的介绍了一下ansible的模块.ansible是基于模块工作的,所以我们必须掌握几 ...

  9. ansible的模块使用说明

    参考官方链接: https://docs.ansible.com/ansible/latest/user_guide/intro_adhoc.html#parallelism-and-shell-co ...

随机推荐

  1. POJ 3228 Gold Transportation

    Gold Transportation Time Limit: 2000ms Memory Limit: 65536KB This problem will be judged on PKU. Ori ...

  2. JS中的call()(转)

    1.方法定义 call方法: 语法:call([thisObj[,arg1[, arg2[, [,.argN]]]]]) 定义:调用一个对象的一个方法,以另一个对象替换当前对象. 说明: call 方 ...

  3. springboot配置容器

    servlet容器配置 Spring Boot快速的原因除了自动配置外,另一个就是将web常用的容器也集成进来并做自动配置,让使用它的人能更快速的搭建web项目,快速的实现自己的业务目的.什么是容器? ...

  4. git-osc自己定义控件之:CircleImageView

    git-osc自己定义控件之:CircleImageView 一.CircleImageView的使用 在项目中能够发现,用户的头像都是圆形的.感觉非常好奇,昨天最终发现了,原来是自定了一个Image ...

  5. disruptor实操作手冊(二)

    多消费者场景 上一篇文章介绍了怎样构建一个简单的disruptorproject之后.应该有相当一部分客官骂娘了,确实这种范例在其他地方多的是. 从这篇開始,介绍一些不一样的东西. 一,多个消费者: ...

  6. UVA 10127- Ones 数学

    Given any integer 0 ≤ n ≤ 10000 not divisibleby 2 or 5, some multiple of n is a number whichin decim ...

  7. awesome-free-software

    Free software is distributed under terms that allow users to run the program for any purpose, study ...

  8. 一个JavaWeb项目中使用的部分技术

    -- 2015年8月8日 1. Web框架: Spring+ SpringMVC + MyBatis Spring: 作为容器.工厂,用于解耦以及管理对象生命周期. 整合各类框架和依赖. MVC  : ...

  9. 超高性能管线式HTTP请求(实践·原理·实现)

    超高性能管线式HTTP请求(实践·原理·实现) 一.总结 一句话总结:实际pipe早就被http1.1所支持,并且大部分nginx服务器也支持并开启了这一功能. pipe之所以能比常规请求方式性能高出 ...

  10. php中的self关键字和this关键字的区别和联系

    php中的self关键字和this关键字的区别和联系 面向对象编程(OOP,Object OrientedProgramming)现已经成为编程人员的一项基本技能.利用OOP的思想进行PHP的高级编程 ...