Files
playbooks-retailor/roles/exporter-fail2ban/tasks/install.yaml

25 lines
720 B
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
- name: Get fail2ban release download url
uri:
url: "https://gitlab.com/hctrdev/fail2ban-prometheus-exporter/-/releases/v{{ fail2ban_exporter_version }}/downloads/fail2ban_exporter_{{ fail2ban_exporter_version }}_linux_amd64.tar.gz"
follow_redirects: all
register: fail2ban_download_url
- name: Download fail2ban Exporter
get_url:
url: "{{ fail2ban_download_url.url }}"
dest: "/tmp/fail2ban_exporter.tar.gz"
- name: Extract fail2ban Exporter
unarchive:
src: "/tmp/fail2ban_exporter.tar.gz"
dest: "/tmp"
remote_src: yes
- name: Move fail2ban Exporter binary
copy:
src: "/tmp/fail2ban_exporter"
dest: "/usr/sbin/fail2ban_exporter"
remote_src: yes
mode: '0755'