community.general.monit 模块 – 通过 Monit 管理程序状态
注意
此模块是 community.general 集合 (版本 10.1.0) 的一部分。
如果您使用的是 ansible
包,则可能已经安装了此集合。它不包含在 ansible-core
中。要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用: ansible-galaxy collection install community.general
。
要在剧本中使用它,请指定: community.general.monit
。
概要
通过 Monit 管理受监控程序的状态。
参数
参数 |
注释 |
---|---|
要管理的 |
|
服务的狀態。 选项
|
|
如果 monit 监控的服务有待处理的操作,则 Ansible 将最多检查这么多秒以验证已执行请求的操作。Ansible 将在每次检查之间休眠五秒钟。 默认值: |
属性
属性 |
支持 |
描述 |
---|---|---|
支持:完全支持 |
可以在 |
|
支持:不支持 |
处于 diff 模式时,将返回有关更改内容(或可能需要在 |
示例
- name: Manage the state of program httpd to be in started state
community.general.monit:
name: httpd
state: started