Restore source style consistency

This commit is contained in:
Alexander Gorelyshev
2025-12-19 16:08:04 +04:00
parent bda231768b
commit a5642463cc
2 changed files with 13 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
---
- name: "Upload ipmi_exporter local configure file"
- name: "Configure | Upload local configuration file"
notify: "(Re)start and enable ipmi_exporter"
when: ipmi_exporter_source_dir is defined and ipmi_exporter_source_dir | length > 0
ansible.builtin.template:
@@ -9,7 +9,7 @@
group: root
mode: '0640'
- name: "Upload ipmi_exporter web configure file"
- name: "Configure | Upload web configuration file"
notify: "(Re)start and enable ipmi_exporter"
when: ipmi_exporter_web_source_dir is defined and ipmi_exporter_web_source_dir | length > 0
ansible.builtin.template:

View File

@@ -1,31 +1,31 @@
---
- name: "Install ipmi_exporter from binary"
- name: "Install | Install ipmi_exporter binary"
block:
- name: "Check ipmi_exporter version"
- name: "Install | Check ipmi_exporter availability"
changed_when: false
register: ipmi_exporter_ver
ansible.builtin.command:
cmd: "ipmi_exporter --version"
register: ipmi_exporter_ver
- name: "Assert version correctness"
- name: "Install | Assert version correctness"
ansible.builtin.assert:
that: "ipmi_exporter_ver.stdout is regex('{{ ipmi_exporter_version }}')"
success_msg: "ipmi_exporter version {{ ipmi_exporter_version }} is installed and working"
fail_msg: "ipmi_exporter version {{ ipmi_exporter_version }} is not installed or not working correctly"
rescue:
- name: "Create ipmi_exporter directories"
- name: "Install | Create directories"
loop:
- "{{ ipmi_exporter_dir }}"
- "{{ ipmi_exporter_config_dir }}"
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: root
group: root
mode: "0755"
with_items:
- "{{ ipmi_exporter_dir }}"
- "{{ ipmi_exporter_config_dir }}"
- name: "Unarchive ipmi_exporter tar file"
- name: "Install | Unarchive the tarball"
notify: "(Re)start and enable ipmi_exporter"
ansible.builtin.unarchive:
src: "https://github.com/prometheus-community/ipmi_exporter/releases/\
@@ -33,7 +33,7 @@
dest: "{{ ipmi_exporter_dir }}"
remote_src: true
- name: "Move ipmi_exporter binary"
- name: "Install | Rename and move the binary under PATH"
ansible.builtin.copy:
src: "{{ ipmi_exporter_dir }}/ipmi_exporter-{{ ipmi_exporter_version }}.linux-amd64/ipmi_exporter"
dest: "/usr/local/bin/ipmi_exporter"
@@ -42,7 +42,7 @@
group: root
remote_src: true
- name: Create systemd service file
- name: "Install | Create a systemd service file"
ansible.builtin.template:
src: ipmi_exporter.service.j2
dest: /etc/systemd/system/ipmi_exporter.service