class php::packages::xenial { # The needed packages: we could also try libapache2-mod-php5.6filter package { [ 'php5.6', 'php5.6-mysql', 'php5.6-sqlite', 'php5.6-cli', 'php5.6-curl', 'php5.6-gmp', 'libapache2-mod-php5.6' ]: ensure => installed, } # Optional packages package { [ "php5.6-gd", "php5.6-imagick" ]: ensure => installed, } # Not available anymore package { 'php5.6-suhosin': ensure => absent, } # The needed apache modules apache::module { 'php5.6': ensure => present, require => Package['libapache2-mod-php5.6'], } }