From f209393711fdcd01329c36cffd720deb359dc71e Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 15 Apr 2014 10:07:48 +0200 Subject: [PATCH] Add Mockery when provisioning vagrant resolves #5623 --- .vagrant-puppet/manifests/default.pp | 4 ++++ .vagrant-puppet/modules/pear/manifests/package.pp | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.vagrant-puppet/manifests/default.pp b/.vagrant-puppet/manifests/default.pp index e55d916fb..7723f563e 100644 --- a/.vagrant-puppet/manifests/default.pp +++ b/.vagrant-puppet/manifests/default.pp @@ -712,3 +712,7 @@ file { '/etc/icingaweb/dashboard/dashboard.ini': owner => 'apache', group => 'apache', } + +pear::package { 'deepend/Mockery': + channel => 'pear.survivethedeepend.com' +} diff --git a/.vagrant-puppet/modules/pear/manifests/package.pp b/.vagrant-puppet/modules/pear/manifests/package.pp index ed004d139..90b807b3d 100644 --- a/.vagrant-puppet/modules/pear/manifests/package.pp +++ b/.vagrant-puppet/modules/pear/manifests/package.pp @@ -28,14 +28,23 @@ define pear::package( $require_ = Class['pear'] } + if $channel { + exec { "pear discover ${channel}": + command => "sudo pear channel-discover ${channel}", + unless => "pear channel-info ${channel}", + require => $require_, + before => Exec["pear install ${name}"] + } + } + exec { "pear install ${name}": - command => "pear install --alldeps ${channel}", - creates => "/usr/bin/${name}", + command => "pear install --alldeps ${name}", + unless => "pear list ${name}", require => $require_ } exec { "pear upgrade ${name}": - command => "pear upgrade ${channel}", + command => "pear upgrade ${name}", require => Exec["pear install ${name}"] } }