diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-07-11 11:48:28 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-07-11 11:48:28 -0300 |
commit | 7952643b01ce91646c0fcc64341ddabd15038dbe (patch) | |
tree | 0d40850ea4ff78fe06388770d6563ecec4e897db /manifests/packages/ppa.pp | |
parent | 7581a6b6e243e6c7237e3e9bb92e7591710d4d21 (diff) | |
download | puppet-php-7952643b01ce91646c0fcc64341ddabd15038dbe.tar.gz puppet-php-7952643b01ce91646c0fcc64341ddabd15038dbe.tar.bz2 |
Uses apt::packages::dpa and apt::packages::ppa
Diffstat (limited to 'manifests/packages/ppa.pp')
-rw-r--r-- | manifests/packages/ppa.pp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/manifests/packages/ppa.pp b/manifests/packages/ppa.pp new file mode 100644 index 0000000..4dc4f7a --- /dev/null +++ b/manifests/packages/ppa.pp @@ -0,0 +1,55 @@ +class php::packages::ppa { + #package { 'python-software-properties': + # ensure => present, + #} + + ## TODO: check repository key! + #exec { 'add-apt-repository-ondrej-php': + # command => '/usr/bin/add-apt-repository -y ppa:ondrej/php && apt-get update', + # user => 'root', + # creates => '/etc/apt/sources.list.d/ondrej-ubuntu-php-xenial.list', + # require => Package['python-software-properties'], + #} + + # The needed packages: we could also try libapache2-mod-php5.6filter + package { 'php5': + name => 'php5.6', + #require => Exec['add-apt-repository-ondrej-php'], + } + + package { 'php5-cli': + name => 'php5.6-cli', + #require => Exec['add-apt-repository-ondrej-php'], + } + + package { [ 'php5.6-mysql', 'php5.6-sqlite3', 'php5.6-curl', 'php5.6-gmp', 'libapache2-mod-php5.6' ]: + ensure => installed, + #require => Exec['add-apt-repository-ondrej-php'], + } + + # Optional packages + package { [ "php5.6-gd", "php-imagick" ]: + ensure => installed, + #require => Exec['add-apt-repository-ondrej-php'], + } + + # Not available anymore + package { 'php5.6-suhosin': + ensure => absent, + #require => Exec['add-apt-repository-ondrej-php'], + } + + # The needed apache modules + apache::module { 'php5.6': + ensure => present, + require => Package['libapache2-mod-php5.6'], + } + + # Default alternative + file { "/etc/alternatives/php": + ensure => "/usr/bin/php5.6", + owner => root, + group => root, + require => Package['php5'], + } +} |