Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 11725f6

Browse files
author
Dirk Pahl
committed
Add install symphony vendors from deps when not using composer, add some relationships between recipes
1 parent baf646c commit 11725f6

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

Readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ Installed components
2020
* [pear](http://pear.php.net/)
2121
* [Node.js](http://nodejs.org/)
2222
* [npm](http://npmjs.org/)
23+
* [less](http://lesscss.org/)
2324
* [Symfony2 Standard Edition](https://github.com/symfony/symfony-standard)
2425
* [MySQL](http://dev.mysql.com/downloads/mysql/)
2526
* [MongoDB](http://www.mongodb.org/)
27+
* [Capistrano](https://github.com/capistrano/capistrano)
2628

2729
TODO
2830
----

manifests/default.pp

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848

4949
exec { 'install PHP MongoDB extension via pecl':
5050
command => 'pecl install mongo',
51+
unless => "pecl info mongo",
5152
notify => Service["php5-fpm"],
5253
}
5354

@@ -120,14 +121,15 @@
120121

121122
class development {
122123

123-
$devPackages = [ "curl", "git", "php-pear", "nodejs", "npm", "mongodb-10gen" ]
124+
$devPackages = [ "curl", "git", "php-pear", "nodejs", "npm", "mongodb-10gen", "capistrano" ]
124125
package { $devPackages:
125126
ensure => "installed",
126127
require => Exec['apt-get update'],
127128
}
128129

129130
exec { 'install less using npm':
130-
command => 'npm install less -g'
131+
command => 'npm install less -g',
132+
require => Package["npm"],
131133
}
132134

133135
service { "mongodb":
@@ -143,13 +145,21 @@
143145
creates => "/vagrant/www/symfony"
144146
}
145147

146-
exec { 'install composer for symfony':
147-
command => 'curl -s http://getcomposer.org/installer | php -- --install-dir=/vagrant/www/symfony'
148+
exec { 'install composer for symfony when needed':
149+
command => 'curl -s http://getcomposer.org/installer | php -- --install-dir=/vagrant/www/symfony',
150+
onlyif => "test -e /vagrant/www/symfony/composer.json",
148151
}
149152

150-
exec { 'run composer for symfony':
153+
exec { 'run composer for symfony when composer is used':
151154
command => 'php composer.phar install --prefer-source',
152-
cwd => "/vagrant/www/symfony"
155+
cwd => "/vagrant/www/symfony",
156+
onlyif => "test -e /vagrant/www/symfony/composer.json",
157+
}
158+
159+
exec { 'run vendor installation from deps when composer is not used':
160+
command => 'php bin/vendors install',
161+
cwd => "/vagrant/www/symfony",
162+
unless => "test -e /vagrant/www/symfony/composer.json",
153163
}
154164
}
155165

0 commit comments

Comments
 (0)