From df9c0db12601ff1b0924a0e879693925c51803b4 Mon Sep 17 00:00:00 2001 From: Tomas Barton Date: Wed, 6 Mar 2024 14:20:14 +0100 Subject: [PATCH] Support fetching debian packages over http (#36) --- manifests/init.pp | 3 +-- manifests/repo/debian.pp | 27 ++++++++++++++++++++++----- types/packagesource.pp | 2 +- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index af858d1..c5c75cb 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,5 +1,4 @@ -# Class: beegfs -# =========================== +# @summary Manages beegfs installations # # @param manage_repo # @param mgmtd_host diff --git a/manifests/repo/debian.pp b/manifests/repo/debian.pp index 37e0bca..cc9b22c 100644 --- a/manifests/repo/debian.pp +++ b/manifests/repo/debian.pp @@ -2,16 +2,17 @@ # # @param manage_repo # @param package_source +# Either `beegfs` or `beegfs-http` for unsecure transport # @param release # @param gpg_key_id # @param dist class beegfs::repo::debian ( - Boolean $manage_repo = true, - Enum['beegfs'] $package_source = $beegfs::package_source, - Beegfs::Release $release = $beegfs::repo::release, - Optional[String] $gpg_key_id = undef, - Optional[String] $dist = undef, + Boolean $manage_repo = true, + Beegfs::PackageSource $package_source = $beegfs::package_source, + Beegfs::Release $release = $beegfs::repo::release, + Optional[String] $gpg_key_id = undef, + Optional[String] $dist = undef, ) { include apt @@ -103,6 +104,22 @@ }, } } + 'beegfs-http': { + apt::source { 'beegfs': + location => "http://www.beegfs.io/release/beegfs_${_release}", + repos => 'non-free', + architecture => 'amd64', + release => $_os_release, + key => { + 'id' => $_gpg_key_id, + 'source' => "https://www.beegfs.com/release/beegfs_${_release}/gpg/${_gpg_key}", + }, + include => { + 'src' => false, + 'deb' => true, + }, + } + } default: { fail("Unknown package source '${package_source}'") } diff --git a/types/packagesource.pp b/types/packagesource.pp index 7cdaa71..3664c57 100644 --- a/types/packagesource.pp +++ b/types/packagesource.pp @@ -1 +1 @@ -type Beegfs::PackageSource = Enum['beegfs'] +type Beegfs::PackageSource = Enum['beegfs','beegfs-http']