Fix install
This commit is contained in:
parent
f74de4a831
commit
68ab0aa1ec
@ -27,7 +27,7 @@
|
||||
- "{{ loki_storage_dir }}/chunks"
|
||||
when: ('loki' in loki_bins)
|
||||
|
||||
- name: create loki configuration directories
|
||||
- name: Create loki configuration directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
@ -38,8 +38,7 @@
|
||||
- "{{ loki_config_dir }}"
|
||||
|
||||
- block:
|
||||
- name: download binaries to local folder
|
||||
become: false
|
||||
- name: Download binaries
|
||||
get_url:
|
||||
url: "https://github.com/grafana/loki/releases/download/v{{ loki_version }}/{{ item }}-linux-{{ go_arch }}.zip"
|
||||
dest: "/tmp/{{ item }}-{{ loki_version }}-linux-{{ go_arch }}.zip"
|
||||
@ -49,31 +48,29 @@
|
||||
retries: 5
|
||||
delay: 2
|
||||
loop: "{{ loki_bins }}"
|
||||
delegate_to: localhost
|
||||
check_mode: false
|
||||
|
||||
- name: unpack binaries
|
||||
become: false
|
||||
- name: Unpack binaries
|
||||
unarchive:
|
||||
src: "/tmp/{{ item }}-{{ loki_version }}-linux-{{ go_arch }}.zip"
|
||||
dest: "/tmp"
|
||||
creates: "/tmp/{{ item }}-{{ loki_version }}-linux-{{ go_arch }}"
|
||||
loop: "{{ loki_bins }}"
|
||||
delegate_to: localhost
|
||||
check_mode: false
|
||||
|
||||
- name: propagate official binaries
|
||||
- name: Copy binaries
|
||||
copy:
|
||||
src: "/tmp/{{ item }}-linux-{{ go_arch }}"
|
||||
dest: "/usr/local/bin/{{ item }}"
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
remote_src: true
|
||||
loop: "{{ loki_bins }}"
|
||||
notify:
|
||||
- restart loki
|
||||
|
||||
- name: create systemd service unit
|
||||
|
||||
- name: Create systemd service unit
|
||||
template:
|
||||
src: "{{ item }}.service.j2"
|
||||
dest: "/etc/systemd/system/{{ item }}.service"
|
||||
|
Loading…
Reference in New Issue
Block a user