From 0eb1d68933ee21496541ff62b03325072df2af15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Fortin?= Date: Fri, 12 Feb 2021 08:45:10 -0500 Subject: [PATCH] Add explicit requirement on dkms and kernel-devel --- site/profile/manifests/gpu.pp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/site/profile/manifests/gpu.pp b/site/profile/manifests/gpu.pp index d077eac51..f152b2478 100644 --- a/site/profile/manifests/gpu.pp +++ b/site/profile/manifests/gpu.pp @@ -15,15 +15,12 @@ } } -class profile::gpu::install::deps { +class profile::gpu::install { ensure_resource('file', '/etc/nvidia', {'ensure' => 'directory' }) ensure_packages(['kernel-devel'], {ensure => 'installed'}) ensure_packages(['dkms'], { 'require' => Yumrepo['epel'] }) -} - -class profile::gpu::install { if ! $facts['nvidia_grid_vgpu'] { require profile::gpu::install::passthrough @@ -83,7 +80,6 @@ } class profile::gpu::install::passthrough(Array[String] $packages) { - require profile::gpu::install::deps $cuda_ver = $::facts['nvidia_cuda_version'] $os = "rhel${::facts['os']['release']['major']}" @@ -122,8 +118,6 @@ Enum['rpm', 'bin', 'none'] $installer = 'none', ) { - require profile::gpu::install::deps - if $installer == 'rpm' { include profile::gpu::install::vgpu::rpm } elsif $installer == 'bin' { @@ -178,6 +172,10 @@ '/usr/bin/nvidia-modprobe', ], timeout => 300, + require => [ + Package['kernel-devel'], + Package['dkms'], + ] } file { '/etc/nvidia/gridd.conf':