community.general.logentries 模块 – 通过 logentries.com 跟踪日志的模块
注意
此模块是 community.general 集合(版本 10.1.0)的一部分。
如果您正在使用 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install community.general。
要在 playbook 中使用它,请指定:community.general.logentries。
概要
- 实时将日志发送到 LogEntries 
参数
| 参数 | 注释 | 
|---|---|
| 日志的类型 | |
| 日志的名称 | |
| 日志文件的路径 | |
| 日志的以下状态 选择 
 | 
属性
| 属性 | 支持 | 描述 | 
|---|---|---|
| 支持:完整 | 可以在  | |
| 支持:无 | 当处于 diff 模式时,将返回有关已更改内容(或可能需要在  | 
注释
注意
- 需要 LogEntries 代理,可以通过 logentries.com 上的说明进行安装 
示例
- name: Track nginx logs
  community.general.logentries:
    path: /var/log/nginx/access.log
    state: present
    name: nginx-access-log
- name: Stop tracking nginx logs
  community.general.logentries:
    path: /var/log/nginx/error.log
    state: absent
