27 lines
842 B
YAML
27 lines
842 B
YAML
---
|
|
- name: Assert supported operating system family
|
|
ansible.builtin.assert:
|
|
that:
|
|
- ansible_os_family == "Debian"
|
|
fail_msg: "ai_node_onboarding currently supports Debian/Ubuntu only."
|
|
|
|
- name: Assert minimum RAM for AI node profile
|
|
ansible.builtin.assert:
|
|
that:
|
|
- ansible_memtotal_mb | int >= 16384
|
|
fail_msg: "AI node profile expects at least 16 GB RAM."
|
|
|
|
- name: Detect NVIDIA GPU via lspci
|
|
ansible.builtin.command: lspci
|
|
register: ai_node_lspci
|
|
changed_when: false
|
|
|
|
- name: Derive GPU detection flag
|
|
ansible.builtin.set_fact:
|
|
ai_node_has_nvidia_gpu: "{{ 'NVIDIA' in ai_node_lspci.stdout }}"
|
|
|
|
- name: Warn when no NVIDIA GPU is detected
|
|
ansible.builtin.debug:
|
|
msg: "No NVIDIA GPU was detected via lspci; continuing because this check is advisory."
|
|
when: not ai_node_has_nvidia_gpu | bool
|