Skip to content

Commit

Permalink
Use loki-promtail pkg instead if promtail from docker
Browse files Browse the repository at this point in the history
  • Loading branch information
dergeberl committed Jul 25, 2024
1 parent 1f10991 commit fca049c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 29 deletions.
48 changes: 20 additions & 28 deletions image/install-alpine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,34 +210,26 @@
- name: install promtail
command: "apk add loki-promtail"

#- name: upload promtail
# copy:
# src: ../out/promtail
# dest: /usr/local/bin/promtail
# owner: root
# group: root
# mode: 0755

#- name: Creating promtail user
# user:
# name: "promtail"
# shell: /bin/ash
# groups: wheel
# append: true

#- name: Create a directory for promtail
# file:
# path: /etc/promtail
# state: directory
# mode: '0755'

#- name: add openrc promtail
# copy:
# src: ./promtail.sh
# dest: /etc/init.d/promtail
# owner: root
# group: root
# mode: 0755
- name: Creating promtail user
user:
name: "promtail"
shell: /bin/ash
groups: wheel
append: true

- name: Create a directory for promtail
file:
path: /etc/promtail
state: directory
mode: '0755'

- name: add openrc promtail
copy:
src: ./promtail.sh
dest: /etc/init.d/promtail
owner: root
group: root
mode: 0755

# reload openrc
- name: Reload openrc
Expand Down
2 changes: 1 addition & 1 deletion image/promtail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

name=$RC_SVCNAME
description="promtail"
command="/usr/local/bin/promtail"
command="/usr/bin/promtail"
command_args="-config.file=/etc/promtail/promtail.yaml"
command_user="promtail"
command_background="yes"
Expand Down

0 comments on commit fca049c

Please sign in to comment.