From e519b2aeffdef371f5ff5c06a15822819079deec Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sun, 2 Jul 2023 14:11:06 +1000 Subject: [PATCH] Changed source for package to be url * this removes the need to manually download/store the file, then pass it to the dpkg package manager --- site/profiles/manifests/apt/puppet7.pp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/site/profiles/manifests/apt/puppet7.pp b/site/profiles/manifests/apt/puppet7.pp index aa7d45a..e9e336f 100644 --- a/site/profiles/manifests/apt/puppet7.pp +++ b/site/profiles/manifests/apt/puppet7.pp @@ -36,26 +36,14 @@ class profiles::apt::puppet7 ( $codename = $facts['os']['distro']['codename'] if 'puppet7' in $managed_repos { - # Path to store the downloaded deb file - $puppet_release = "/root/${repo}-${dist}.deb" $puppet_source = "${mirror}/${repo}-release-${dist}.deb" - # Check if the deb file exists - if !defined(File[$puppet_release]) { - # Download the deb file - file { $puppet_release: - ensure => present, - source => $puppet_source, - mode => '0644', - } - } - # Install the puppet release using dpkg package { "${repo}-${dist}": ensure => installed, + name => "${repo}-release", provider => dpkg, - source => $puppet_release, - require => File[$puppet_release], + source => $puppet_source, } # deb http://apt.puppet.com bullseye puppet7