From ed65bb0d94493804dc450eb2726fef2810af1453 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Wed, 1 Nov 2023 16:31:24 +0100 Subject: [PATCH] Use other command in debian --- manifests/script.pp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/manifests/script.pp b/manifests/script.pp index 7c1bd00..ce0a33d 100644 --- a/manifests/script.pp +++ b/manifests/script.pp @@ -81,8 +81,14 @@ class sunetdrive::script ( provider => apt, } $drive_version = '0.3.1' + if $facts['os']['name'] == 'Debian' { + $pip_cmd = 'pip3 install --break-system-packages' + } else { + $pip_cmd = 'python3 -m pip install' + + } exec { 'drive-utils': - command => "python3 -m pip install --break-system-packages https://pypi.sunet.se/packages/drive-utils-${drive_version}.tar.gz", + command => "${pip_cmd} https://pypi.sunet.se/packages/drive-utils-${drive_version}.tar.gz", unless => "python3 -m pip list | grep drive-utils | grep ${drive_version}", require => Package['python3'], }