瀏覽代碼

alerta-webui

master
父節點
當前提交
2d5af059e6
共有 2 個檔案被更改,包括 27 行新增0 行删除
  1. +25
    -0
      tasks/main.yaml
  2. +2
    -0
      vars/main.yaml

+ 25
- 0
tasks/main.yaml 查看文件

@@ -7,3 +7,28 @@
pip:
name: alerta-server
executable: pip3

- name: alerta-webui installation directory
file:
path: /opt/alerta-webui
state: directory

- name: get alerta-webui releases
uri:
url: https://api.github.com/repos/alerta/alerta-webui/releases/latest
return_content: true
register: _alerta_webui_releases

- name: download latest alerta-webui release
get_url:
url: "{{_alerta_webui_dl_url}}"
dest: /opt/alerta-webui/alerta-webui-{{_alerta_webui_version}}.tar.gz

- name: extract alerta-webui release
unarchive:
src: /opt/alerta-webui/alerta-webui-{{_alerta_webui_version}}.tar.gz
dest: /opt/alerta-webui
mode: u=rwx,g=rx,o=rx
owner: root
group: root
remote_src: true

+ 2
- 0
vars/main.yaml 查看文件

@@ -1 +1,3 @@
---
_alerta_webui_dl_url: "{{ _alerta_webui_releases.json.assets | json_query(\"[?name=='alerta-webui.tar.gz'].browser_download_url|[0]\") }}"
_alerta_webui_version: "{{ _alerta_webui_releases.json.tag_name }}"

Loading…
取消
儲存