|
@@ -4,15 +4,25 @@
|
|
name: gtar
|
|
name: gtar
|
|
state: latest
|
|
state: latest
|
|
|
|
|
|
-- name: Loki binary downloaded
|
|
|
|
- shell: fetch https://github.com/grafana/loki/releases/download/v2.2.0/loki-freebsd-amd64.zip -o /usr/local/bin/loki.zip
|
|
|
|
|
|
+- name: Loki fetched
|
|
|
|
+ get_url:
|
|
|
|
+ url: https://github.com/grafana/loki/releases/download/v2.4.1/loki-freebsd-amd64.zip
|
|
|
|
+ dest: /usr/local/bin/loki.zip
|
|
|
|
|
|
-#- name: Unpack Loki binary
|
|
|
|
-# shell: unzip /usr/local/bin/loki.zip
|
|
|
|
-# warn: false
|
|
|
|
|
|
+- name: Loki binary unpacked
|
|
|
|
+ command: "unzip -o /usr/local/bin/loki.zip"
|
|
|
|
+ args:
|
|
|
|
+ chdir: /usr/local/bin
|
|
|
|
+ warn: false
|
|
|
|
|
|
-- name: Supervisord enabled
|
|
|
|
- shell: sysrc supervisord_enable="YES"
|
|
|
|
|
|
+- name: Loki rc file installed
|
|
|
|
+ ansible.builtin.copy:
|
|
|
|
+ src: loki.rc
|
|
|
|
+ dest: /usr/local/etc/rc.d/loki
|
|
|
|
+ mode: a+x
|
|
|
|
+
|
|
|
|
+- name: Loki enabled
|
|
|
|
+ shell: sysrc loki_enable="YES"
|
|
|
|
|
|
- name: Loki config file installed
|
|
- name: Loki config file installed
|
|
template:
|
|
template:
|
|
@@ -20,12 +30,7 @@
|
|
dest: /usr/local/etc/loki.config.yml
|
|
dest: /usr/local/etc/loki.config.yml
|
|
owner: root
|
|
owner: root
|
|
mode: 0644
|
|
mode: 0644
|
|
- notify: Supervisor restarted
|
|
|
|
|
|
+ notify: Loki restarted
|
|
|
|
|
|
-- name: Loki supervisor file installed
|
|
|
|
- copy:
|
|
|
|
- src: loki-supervisor.conf
|
|
|
|
- dest: /usr/local/etc/supervisor/conf.d/loki.conf
|
|
|
|
- owner: root
|
|
|
|
- mode: 0644
|
|
|
|
- notify: Supervisor restarted
|
|
|
|
|
|
+- name: Loki started
|
|
|
|
+ service: name=loki state=started
|