aboutsummaryrefslogtreecommitdiff
path: root/manifests/series5/packages.pp
blob: 3a89244b51ad8b044f255a318af30d9fe9683584 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
class php::series5::packages inherits php::packages {
  $version = $::php::params::version5

  # The needed packages: we could also try libapache2-mod-php5.6filter
  package { 'php5':
    name    => "php${version}",
    require => File['/etc/apt/sources.list.d/php.list'],
  }

  package { 'php5-cli':
    name    => "php${version}-cli",
    require => File['/etc/apt/sources.list.d/php.list'],
  }

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

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

  # Not available anymore
  package { 'php${version}-suhosin':
    ensure  => absent,
    require => File['/etc/apt/sources.list.d/php.list'],
  }

  # The old module
  #apache::module { 'php5':
  #  ensure => absent,
  #}

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