小编Doc*_*fun的帖子

Ansible 中的 Try-Catch 任务超时

让我们考虑以下伪 ansible 代码:

- name: "some long task which can hang
- command: "something"  
- timeout: 60s

- name: "catch in case of failure (in particularity timeout)"
- command: "some helpful debug command"
Run Code Online (Sandbox Code Playgroud)

可以用ansible来做吗?

ansible

4
推荐指数
1
解决办法
7473
查看次数

来自自定义ansible模块的调试信息

我用python编写了自己的ansible模块。它工作正常,但是我想在运行任务期间报告一些信息(任务需要很长时间)。我知道执行任务后,会将stdout写入控制台。

但是,我想在任务执行过程中显示一些信息。可能吗?

python ansible

2
推荐指数
1
解决办法
470
查看次数

标签 统计

ansible ×2

python ×1