From 95ee0104e6a5ab9094314155c82479061fd41409 Mon Sep 17 00:00:00 2001 From: Jea-Eok-Kim Date: Mon, 7 Sep 2026 14:02:15 +0900 Subject: [PATCH] chore(slurm): derive PAM module directory from target architecture The Debian multiarch tuple was hardcoded to x86_64-linux-gnu, so an aarch64 node ended up with a /lib/x86_64-linux-gnu/security directory. Nothing breaks today: the same variable feeds --with-pam_dir at configure time and the path written into /etc/pam.d/sshd, so the build installs the module exactly where PAM looks for it. The directory name is still wrong for the host. Resolve the tuple from ansible_architecture through an explicit map. The map is explicit rather than an "-linux-gnu" format string because armv7l maps to arm-linux-gnueabihf and ppc64le to powerpc64le-linux-gnu, neither of which follows that shape. An unlisted architecture falls back to the format string so the role does not hard-fail. x86_64 resolves to the same value as before. roles/slurm/vars/redhat.yml is already architecture-agnostic (/lib64/security); this brings the Ubuntu path in line with it. --- roles/slurm/vars/ubuntu.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/roles/slurm/vars/ubuntu.yml b/roles/slurm/vars/ubuntu.yml index a6fa90769..ef92f0e16 100644 --- a/roles/slurm/vars/ubuntu.yml +++ b/roles/slurm/vars/ubuntu.yml @@ -1,5 +1,17 @@ --- -slurm_pam_lib_dir: /lib/x86_64-linux-gnu/security +# Debian multiarch tuple for the PAM module directory. This is an explicit map +# because the tuple is not derivable from ansible_architecture: armv7l maps to +# arm-linux-gnueabihf and ppc64le to powerpc64le-linux-gnu, neither of which +# follows the "-linux-gnu" shape. Add an entry here for a new architecture. +# 'arm64' matches existing practice in roles/nvidia-dgx/vars/ubuntu-24.04.yml. +slurm_pam_arch_map: + x86_64: x86_64-linux-gnu + aarch64: aarch64-linux-gnu + arm64: aarch64-linux-gnu + armv7l: arm-linux-gnueabihf + ppc64le: powerpc64le-linux-gnu + +slurm_pam_lib_dir: "/lib/{{ slurm_pam_arch_map.get(ansible_architecture, ansible_architecture + '-linux-gnu') }}/security" slurm_build_deps: - build-essential