fix ansible-lint errors
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
when: smartctl_exp_source_web_config_dir is defined and smartctl_exp_source_web_config_dir | length > 0
|
||||
ansible.builtin.template:
|
||||
src: "{{ smartctl_exp_source_web_config_dir }}/web_smartctl.conf"
|
||||
dest: "{{ smartctl_exp_web_config_dir }}/web_smartctl.conf"
|
||||
dest: "{{ smartctl_exporter_web_config_dir }}/web_smartctl.conf"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0640'
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user