community.grafana.grafana_plugin 模块 – 通过 grafana-cli 管理 Grafana 插件
注意
此模块是 community.grafana 集合 (版本 2.1.0) 的一部分。
如果您使用的是 ansible 包,则可能已经安装了此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用: ansible-galaxy collection install community.grafana。
要在剧本中使用它,请指定: community.grafana.grafana_plugin。
概要
- 安装和删除 Grafana 插件。 
- 有关上游文档,请参见 https://grafana.org.cn/docs/plugins/installation/。 
参数
| 参数 | 注释 | 
|---|---|
| 插件 zip 文件的完整 URL,而不是从 https://grafana.org.cn/api/plugins 下载文件。 需要 Grafana 4.6.x 或更高版本。 | |
| 将安装 Grafana 插件的目录。 如果省略,则默认为  | |
| Grafana 插件存储库的 URL。 如果省略,grafana-cli 将使用默认值:https://grafana.org.cn/api/plugins。 | |
| 插件的名称。 | |
| 是否应安装插件。 选项 
 | |
| 布尔变量,用于在安装插件时包含 –insecure 选项 
 | |
| 要安装的插件版本。 默认为  | 
示例
---
- name: Install/update Grafana piechart panel plugin
  community.grafana.grafana_plugin:
    name: grafana-piechart-panel
    version: latest
    state: present
返回值
常见的返回值已在 此处 记录,以下是此模块特有的字段
| 键 | 描述 | 
|---|---|
| 已安装/删除/更新插件的版本。 返回:始终 | 
