Accelerated Mode

port 5099

持续连接30min

---

- hosts: all
accelerate: true tasks: - name: some task
command: echo {{ item }}
with_items:
- foo
- bar
- baz # change port
--- - hosts: all
accelerate: true
# default port is 5099
accelerate_port: 10000 or
# /etc/ansible/ansible.cfg
[accelerate]
accelerate_port = 5099 accelerate_multi_key = yes UNIX socket file
default $ANSIBLE_REMOTE_TEMP/.ansible-accelerate/.local.socket

Asynchronous Actions and Polling

---
- hosts: all
remote_user: root tasks: - name: simulate long running op (15 sec), wait for up to 45 sec, poll every 5 sec
command: /bin/sleep 15
async: 45
poll: 5 ---
- hosts: all
remote_user: root tasks: - name: simulate long running op, allow to run for 45 sec, fire and forget
command: /bin/sleep 15
async: 45
poll: 0 ---
# Requires ansible 1.8+
- name: 'YUM - fire and forget task'
yum: name=docker-io state=installed
async: 1000
poll: 0
register: yum_sleeper - name: 'YUM - check on fire and forget task'
async_status: jid={{ yum_sleeper.ansible_job_id }}
register: job_result
until: job_result.finished
retries: 30

ansible使用9-Playbooks: Special Topics的更多相关文章

  1. Ansible 系列之 Playbooks 剧本 (1)

    一.Playbooks 介绍 1.Playbooks是Ansible的配置,部署和编排语言.它们可以描述您希望远程系统执行的策略,或一般IT流程中的一组步骤. 如果说ansible 模块 是你车间里的 ...

  2. [转] Ansible 系列之 Playbooks 剧本

    [From] https://www.cnblogs.com/hanyifeng/p/6435875.html 一.Playbooks 介绍 1.Playbooks是Ansible的配置,部署和编排语 ...

  3. ansible special topics

    1.加速模式运行playbook accelerate 对于使用ansible 1.5 及之后版本的用户,加速模式只在以下情况下有用处: (A) 管理红帽企业版 Linux 6 或者更早的那些依然使用 ...

  4. 自动化运维—Ansible(上)

    一:为什么选择Ansible 相对于puppet和saltstack,ansible无需客户端,更轻量级 ansible甚至都不用启动服务,仅仅只是一个工具,可以很轻松的实现分布式扩展 更强的远程命令 ...

  5. ansible应用

    前言: 假如让你在一组服务器安装某个软件,服务器少的话还可以接受,但如果有上百台服务器的话,这样会耗费大量时间,在这时候Ansible就由此而生:总之Ansible提供的很多模块十分强大. 一.关于a ...

  6. 自动化运维工具ansible学习+使用ansible批量推送公钥到远程主机

    目录: 一.ansible简介 1.1.ansible是什么 1.2.ansible如何工作 1.3.ansible优缺点 1.4.ansible安装方式 1.5.ansible文件简单介绍 1.6. ...

  7. Ansible@一个高效的配置管理工具--Ansible configure management--翻译(一)

    未经书面许可,请勿转载 ---      Ansible is the simplest way to automate apps and IT infrastructure 这是Ansible官方站 ...

  8. Ansible自动化运维笔记2(Ansible的组件介绍)

    1.Ansible Inventory (1)静态主机文件 默认的ansible invetory是/etc/hosts文件,可以通过ANSIBLE_HOSTS环境变量或者通过运行命令的时候加上-i ...

  9. ansible学习笔记三:playbook和roles

    参考博客: Ansible 系列之 Playbooks 剧本 -飞走不可(博客园) linux运维学习之ansible的playbook及roles的使用 - 51CTO博客 nginx 基于uwsg ...

随机推荐

  1. git ignore文件

    创建.gitignore文件来设置git要忽略的文件模式: 官方文件列列表:https://github.com/github/gitignore 1. 所有空行或者以 # 开头的行都会被 Git 忽 ...

  2. Experimental Educational Round: VolBIT Formulas Blitz N

    Description The Department of economic development of IT City created a model of city development ti ...

  3. 找到一篇关于 Oracle 全文检索实践 的文章

    http://www.iteye.com/topic/1118055 有详细的例子记录了Oracle 全文检索的使用.

  4. EXCEL 导入SQL SERVER 方法

    1.注意:确认是否已安装 AccessDatabaseEngine.exe 2.可视化按提示操作.

  5. 9.JSP进阶

    1.JSP内置对象 JSP容器在_jspService()方法中声明并初始化9个内置对象. 名称 作用 接口/类 out 客户端打开的输出流 javax.servlet.jsp.JspWriter 接 ...

  6. 转 sql profile 绑定 litera and move profile to another db l for spa

    SQL TYPE 1:for bind value sql , first create a good plan with literal and with good  profile. then u ...

  7. 01 性能优化基础怀实践 之 ASH分析

    1.模拟一个会话阻塞的场景.    通过update 同一行数据达到模拟阻塞的效果 : SQL> create table t1 (id number ,name varchar2(20)) ; ...

  8. python Gensim库建立word2vec参数说明

    from gensim.models import word2vec model = word2vec.Word2Vec(sentences, size=80, window=10,workers=6 ...

  9. js 中callback函数的定义和使用

    这是js里的解释了,其他语言的算我没说. 字面上理解下来就是,回调就是一个函数的调用过程.那么就从理解这个调用过程开始吧.函数a有一个参数,这个参数是个函数b,当函数a执行完以后执行函数b.那么这个过 ...

  10. 性能测试工具LoadRunner21-LR之Controller 常用函数

    1.事务函数: Lr_start_transaction();  //标记事务的开始 Lr_end_transaction();  //标记事务的结束,一般情况下,事务开始与结束联合使用 Lr_get ...