Skip to content

Commit

Permalink
fix(CI): extract promtail with expected filename
Browse files Browse the repository at this point in the history
  • Loading branch information
meysam81 committed Sep 21, 2024
1 parent 846b61a commit 55f82dc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ repos:
- id: pretty-format-json
args:
- --autofix
- repo: https://github.com/ansible/ansible-lint
rev: v24.9.0
hooks:
- id: ansible-lint
# - repo: https://github.com/ansible/ansible-lint
# rev: v24.9.0
# hooks:
# - id: ansible-lint
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.18.0
hooks:
Expand Down
16 changes: 13 additions & 3 deletions roles/promtail/tasks/setup-Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,27 @@
group: "{{ promtail_group }}"
checksum: "sha256:{{ promtail_checksum }}"
register: promtail_download
- name: Extract & install promtail binary
- name: Extract promtail

Check failure on line 11 in roles/promtail/tasks/setup-Debian.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

no-handler

Tasks that run when changed should likely be handlers.
ansible.builtin.unarchive:
src: "/tmp/{{ promtail_url | basename }}"
dest: /usr/local/bin/
dest: /tmp/
owner: root
group: root
extra_opts:
- --strip-components=1
- --wildcards
- */promtail*
- "*/promtail*"
remote_src: true
register: promtail_extract
when: promtail_download.changed
- name: Install promtail binary
ansible.builtin.copy:
src: "{{ promtail_extract.files | first }}"
dest: /usr/local/bin/promtail
owner: root
group: root
mode: "0555"
notify: Restart promtail
- name: Create promtail relevant dir
ansible.builtin.file:
path: "{{ item }}"
Expand Down

0 comments on commit 55f82dc

Please sign in to comment.