parent
117c8430be
commit
a4d5501de5
|
@ -256,3 +256,7 @@ class { 'casperjs':
|
|||
file { '/etc/profile.d/env.sh':
|
||||
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/profile.d/env.sh'
|
||||
}
|
||||
|
||||
pear::package { 'phpcs':
|
||||
channel => 'PHP_CodeSniffer'
|
||||
}
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
# Class: pear
|
||||
#
|
||||
# This class installs pear.
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# Actions:
|
||||
#
|
||||
# Requires:
|
||||
#
|
||||
# php
|
||||
#
|
||||
# Sample Usage:
|
||||
#
|
||||
# include pear
|
||||
#
|
||||
class pear {
|
||||
|
||||
Exec { path => '/usr/bin:/bin' }
|
||||
|
||||
include php
|
||||
|
||||
package { 'php-pear':
|
||||
ensure => installed,
|
||||
require => Class['php']
|
||||
}
|
||||
|
||||
exec { 'pear upgrade':
|
||||
command => 'pear upgrade',
|
||||
require => Package['php-pear']
|
||||
}
|
||||
|
||||
exec { 'pear update-channels':
|
||||
command => 'pear update-channels',
|
||||
require => Package['php-pear']
|
||||
}
|
||||
|
||||
exec { 'pear auto discover channels':
|
||||
command => 'pear config-set auto_discover 1',
|
||||
unless => 'pear config-get auto_discover | grep 1',
|
||||
require => Package['php-pear']
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
# Define: pear::package
|
||||
#
|
||||
# Install additional PEAR packages
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# Actions:
|
||||
#
|
||||
# Requires:
|
||||
#
|
||||
# pear
|
||||
#
|
||||
# Sample Usage:
|
||||
#
|
||||
# pear::package { 'phpunit': }
|
||||
#
|
||||
define pear::package(
|
||||
$channel
|
||||
) {
|
||||
|
||||
Exec { path => '/usr/bin' }
|
||||
|
||||
include pear
|
||||
|
||||
if $::require {
|
||||
$require_ = [Class['pear'], $::require]
|
||||
} else {
|
||||
$require_ = Class['pear']
|
||||
}
|
||||
|
||||
exec { "pear install ${name}":
|
||||
command => "pear install --alldeps ${channel}",
|
||||
creates => "/usr/bin/${name}",
|
||||
require => $require_
|
||||
}
|
||||
|
||||
exec { "pear upgrade ${name}":
|
||||
command => "pear upgrade ${channel}",
|
||||
require => Exec["pear install ${name}"]
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue