From bf3c87ede4ed1f3a849ec9b55136681b2e291780 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 6 Jun 2013 16:48:15 +0200 Subject: [PATCH] Vagrant: Add nodejs and PHPUnit refs #4219 --- .vagrant-puppet/manifests/default.pp | 20 ++++++++++++++-- .../modules/epel/manifests/init.pp | 24 +++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 .vagrant-puppet/modules/epel/manifests/init.pp diff --git a/.vagrant-puppet/manifests/default.pp b/.vagrant-puppet/manifests/default.pp index 5a3d59efa..062a4242d 100644 --- a/.vagrant-puppet/manifests/default.pp +++ b/.vagrant-puppet/manifests/default.pp @@ -257,6 +257,22 @@ file { '/etc/profile.d/env.sh': source => 'puppet:////vagrant/.vagrant-puppet/files/etc/profile.d/env.sh' } -pear::package { 'phpcs': - channel => 'PHP_CodeSniffer' +include epel + +exec { 'install PHPUnit': + command => 'yum -d 0 -e 0 -y --enablerepo=epel install php-phpunit-PHPUnit', + unless => 'rpm -qa | grep php-phpunit-PHPUnit', + require => Class['epel'] +} + +exec { 'install PHP CodeSniffer': + command => 'yum -d 0 -e 0 -y --enablerepo=epel install php-pear-PHP-CodeSniffer', + unless => 'rpm -qa | grep php-pear-PHP-CodeSniffer', + require => Class['epel'] +} + +exec { 'install nodejs': + command => 'yum -d 0 -e 0 -y --enablerepo=epel install npm', + unless => 'rpm -qa | grep ^npm', + require => Class['epel'] } diff --git a/.vagrant-puppet/modules/epel/manifests/init.pp b/.vagrant-puppet/modules/epel/manifests/init.pp new file mode 100644 index 000000000..65e0a2603 --- /dev/null +++ b/.vagrant-puppet/modules/epel/manifests/init.pp @@ -0,0 +1,24 @@ +# Class: epel +# +# Configure EPEL repository. +# +# Parameters: +# +# Actions: +# +# Requires: +# +# Sample Usage: +# +# include epel +# +class epel { + + yumrepo { 'epel': + mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=${::architecture}", + enabled => '0', + gpgcheck => '0', + descr => "Extra Packages for Enterprise Linux 6 - ${::architecture}" + } +} +