aboutsummaryrefslogtreecommitdiff
path: root/manifests/series7/packages.pp
blob: c2c0a210302b92c903e38ffe21b94c62c5deac62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class php::series7::packages inherits php::packages {
  $version = $::php::params::version7

  package { [ "php${version}-common", "php${version}-mysql", "php${version}-cli", "php${version}-curl", "php${version}-gmp", "php${version}-xml", "php${version}-mbstring", "libapache2-mod-php${version}" ]:
    ensure  => installed,
    require => File['/etc/apt/sources.list.d/php.list'],
  }

  # Optional packages
  package { [ "php${version}-gd" ]:
    ensure  => installed,
    require => File['/etc/apt/sources.list.d/php.list'],
  }

  # Default alternative
  if $::php::default_cli == '7' {
    file { "/etc/alternatives/php":
      ensure  => "/usr/bin/php${version}",
      owner   => root,
      group   => root,
      require => Package["php${version}-cli"],
    }
  }
}