Skip to content

Instantly share code, notes, and snippets.

@Tombar
Created October 7, 2014 12:38
Show Gist options
  • Save Tombar/a6fc55a1705c0216cc62 to your computer and use it in GitHub Desktop.
Save Tombar/a6fc55a1705c0216cc62 to your computer and use it in GitHub Desktop.
file { $logdir:
ensure => 'directory',
owner => 'root' ,
group => 'root',
mode => '0775'
}
apt::key { "php-repo-${$version}-key":
key => 'E9C74FEEA2098A6E'
}
$repo = regsubst($version, '\.', '')
apt::source { "php-repo-${$version}":
location => 'http://packages.dotdeb.org',
release => "${::lsbdistcodename}-php${repo}",
repos => 'all',
require => [ Apt::Key["php-repo-${$version}-key"], File[$logdir] ]
}
class { ['php::fpm', 'php::cli', 'php::dev']:
ensure => "${version}*", #DO NOT REMOVE the * it's needed to match minor version
require => [ Apt::Source["php-repo-${$version}"], Apt::Key["php-repo-${$version}-key"], File[$logdir]]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment