aboutsummaryrefslogtreecommitdiff
path: root/manifests/series5/packages.pp
blob: 373a655c524c2c7974aa66bf41b68291aa2aced3 (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'],
    }
  }
}