view modules/php/manifests/repo/ubuntu.pp @ 482:d83de9b3a62b default tip

Update hiera.yaml within Puppet config Forgot that we manage it from here. Now has content to match new packages
author IBBoard <dev@ibboard.co.uk>
date Fri, 30 Aug 2024 16:10:36 +0100
parents 3fce34f642f1
children
line wrap: on
line source

# Configure ubuntu ppa
#
# === Parameters
#
# [*version*]
#   PHP version to manage (e.g. 5.6)
#
class php::repo::ubuntu (
  Pattern[/^\d\.\d/] $version = '5.6',
) {
  if $facts['os']['name'] != 'Ubuntu' {
    fail("class php::repo::ubuntu does not work on OS ${facts['os']['name']}")
  }
  include 'apt'

  if ($version == '5.5') {
    fail('PHP 5.5 is no longer available for download')
  }

  $version_repo = $version ? {
    '5.4'   => 'ondrej/php5-oldstable',
    default => 'ondrej/php'
  }

  ::apt::ppa { "ppa:${version_repo}":
    package_manage => true,
  }
}