Puppet Class: php::packages

Inherits:
::php::params
Defined in:
manifests/packages.pp

Overview

Install common PHP packages

Parameters

ensure

Specify which version of PHP packages to install

names

List of the names of the package to install

names_to_prefix

List of packages names that should be prefixed with the common package prefix ‘$php::package_prefix`

Parameters:

  • ensure (Any) (defaults to: $::php::ensure)
  • names_to_prefix (Any) (defaults to: prefix( $::php::params::common_package_suffixes, $::php::package_prefix # lint:ignore:parameter_documentation ))
  • names (Any) (defaults to: $::php::params::common_package_names)


15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'manifests/packages.pp', line 15

class php::packages (
  $ensure          = $::php::ensure,
  $names_to_prefix = prefix(
    $::php::params::common_package_suffixes, $::php::package_prefix # lint:ignore:parameter_documentation
  ),
  $names           = $::php::params::common_package_names,
) inherits ::php::params {

  if $caller_module_name != $module_name {
    warning('php::packages is private')
  }

  validate_string($ensure)
  validate_array($names)
  validate_array($names_to_prefix)

  $real_names = union($names, $names_to_prefix)
  if $::operatingsystem == 'Ubuntu' {
    package { $real_names:
      ensure  => $ensure,
      require => Class['::apt::update'],
    }
  } else {
    package { $real_names:
      ensure => $ensure,
    }
  }
}