From: Nikita Date: Wed, 6 Nov 2019 09:23:55 +0000 (+0300) Subject: Linux Mint Support X-Git-Tag: v7.3.0~3^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=018b71d33d4a1e971ceb8977682f0324de0fc997;p=puppet-modules%2Fpuppetlabs-apt.git Linux Mint Support Feature for a new possibility to replace LinuxMint with Ubuntu --- diff --git a/manifests/ppa.pp b/manifests/ppa.pp index 402961a..ba05485 100644 --- a/manifests/ppa.pp +++ b/manifests/ppa.pp @@ -13,6 +13,10 @@ # Optional if lsb-release is installed (unless you're using a different release than indicated by lsb-release, e.g., Linux Mint). # Specifies the operating system of your node. Valid options: a string containing a valid LSB distribution codename. # +# @param dist +# Optional if lsb-release is installed (unless you're using a different release than indicated by lsb-release, e.g., Linux Mint). +# Specifies the distribution of your node. Valid options: a string containing a valid distribution codename. +# # @param package_name # Names the package that provides the `apt-add-repository` command. Default: 'software-properties-common'. # @@ -23,6 +27,7 @@ define apt::ppa( String $ensure = 'present', Optional[String] $options = $::apt::ppa_options, Optional[String] $release = $facts['lsbdistcodename'], + Optional[String] $dist = $facts['lsbdistid'], Optional[String] $package_name = $::apt::ppa_package, Boolean $package_manage = false, ) { @@ -30,12 +35,12 @@ define apt::ppa( fail(translate('lsbdistcodename fact not available: release parameter required')) } - if $facts['lsbdistid'] == 'Debian' { + if $dist == 'Debian' { fail(translate('apt::ppa is not currently supported on Debian.')) } if versioncmp($facts['lsbdistrelease'], '14.10') >= 0 { - $distid = downcase($facts['lsbdistid']) + $distid = downcase($dist) $dash_filename = regsubst($name, '^ppa:([^/]+)/(.+)$', "\\1-${distid}-\\2") $underscore_filename = regsubst($name, '^ppa:([^/]+)/(.+)$', "\\1_${distid}_\\2") } else {