Skip to content

Commit 10910bd

Browse files
authored
Merge pull request #2205 from stackhpc/fix-smartmon-2026-01
Fix task for when there are no NVMe drives
2 parents a8e8a01 + f04b520 commit 10910bd

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

etc/kayobe/ansible/deployment/get-nvme-drives.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@
1717
- name: Retrieve NVMe device information via smartctl
1818
ansible.builtin.command: "smartctl -i -j {{ item }}"
1919
register: smartctl_info
20-
loop: "{{ nvme_devices }}"
20+
loop: "{{ nvme_devices | default([], true) }}"
2121
loop_control:
2222
label: "{{ item }}"
2323
changed_when: false
2424
become: true
25-
when: nvme_devices | length > 0
2625

2726
- name: Parse NVMe device model names
2827
ansible.builtin.set_fact:
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
fixes:
3+
- |
4+
Fixed an issue with the get-nvme-drives playbook where it would fail if no NVMe drives were present.

0 commit comments

Comments
 (0)