fix ansible-lint errors

This commit is contained in:
Sergey Malyuk
2025-12-16 11:56:52 +03:00
parent 48652534ce
commit f4b945d1ed
7 changed files with 45 additions and 45 deletions

View File

@@ -9,9 +9,9 @@
- name: "Assert version correctness"
ansible.builtin.assert:
that: "smartctl_exporter_ver.stderr is regex('{{ smartctl_exp_version }}')"
success_msg: "smartctl_exporter version {{ smartctl_exp_version }} is installed and working"
fail_msg: "smartctl_exporter version {{ smartctl_exp_version }} is not installed or not working correctly"
that: "smartctl_exporter_ver.stderr is regex('{{ smartctl_exporter_version }}')"
success_msg: "smartctl_exporter version {{ smartctl_exporter_version }} is installed and working"
fail_msg: "smartctl_exporter version {{ smartctl_exporter_version }} is not installed or not working correctly"
rescue:
- name: "Create smartctl_exporter directories"
@@ -22,20 +22,20 @@
group: root
mode: "0755"
with_items:
- "{{ smartctl_exp_dir }}"
- "{{ smartctl_exporter_dir }}"
- "{{ smartctl_exp_config_dir }}"
- name: "Unarchive smartctl_exporter tar file"
notify: "(Re)start and enable smartctl_exporter"
ansible.builtin.unarchive:
src: "https://github.com/prometheus-community/smartctl_exporter/releases/\
download/v{{ smartctl_exp_version }}/smartctl_exporter-{{ smartctl_exp_version }}.linux-amd64.tar.gz"
dest: "{{ smartctl_exp_dir }}"
download/v{{ smartctl_exporter_version }}/smartctl_exporter-{{ smartctl_exporter_version }}.linux-amd64.tar.gz"
dest: "{{ smartctl_exporter_dir }}"
remote_src: true
- name: "Move smartctl_exporter binary"
ansible.builtin.copy:
src: "{{ smartctl_exp_dir }}/smartctl_exporter-{{ smartctl_exp_version }}.linux-amd64/smartctl_exporter"
src: "{{ smartctl_exporter_dir }}/smartctl_exporter-{{ smartctl_exporter_version }}.linux-amd64/smartctl_exporter"
dest: "/usr/local/bin/smartctl_exporter"
mode: "0755"
owner: root