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
47
|
# File 'manifests/module.pp', line 1
define php::module(
$modulename = $name,
$enablefile = undef,
$ensure = 'installed', #TODO
) {
if($modulename=='php5-phalcon')
{
case $::osfamily
{
'Debian':
{
include ::apt
apt::ppa { 'ppa:phalcon/stable':
ensure => 'present',
before => Package[$modulename],
}
}
default: { fail("php5-phalcon unsupported on ${::osfamily}")}
}
}
if($php::use_php_package_prefix_ius==undef)
{
$actual_modulename=$modulename
}
else
{
$actual_modulename = regsubst($modulename, '^php[0-9.]*', $php::use_php_package_prefix_ius)
}
package { $actual_modulename:
ensure => 'installed',
}
if($enablefile)
{
if $modulename =~ /^php[0-9]*-(.*)/
{
file { $enablefile:
ensure => link,
target => "/etc/php5/mods-available/${1}.ini",
}
}
}
}
|