@@ -114,19 +114,19 @@ You will be creating a set of files under a new ``vagrant`` directory:
114
114
fi
115
115
116
116
if [ ! -d "/etc/puppet/modules/apache" ]; then
117
- puppet module install puppetlabs-apache;
117
+ puppet module install -v 1.0.1 puppetlabs-apache;
118
118
fi
119
119
120
120
if [ ! -d "/etc/puppet/modules/mysql" ]; then
121
- puppet module install puppetlabs-mysql;
121
+ puppet module install -v 2.2.3 puppetlabs-mysql;
122
122
fi
123
123
124
124
if [ ! -d "/etc/puppet/modules/apt" ]; then
125
- puppet module install puppetlabs-apt;
125
+ puppet module install -v 1.4.2 puppetlabs-apt;
126
126
fi
127
127
128
128
if [ ! -d "/etc/puppet/modules/git" ]; then
129
- puppet module install puppetlabs-git;
129
+ puppet module install -v 0.0.3 puppetlabs-git;
130
130
fi
131
131
132
132
This script will be executed within the virtual machine to install necessary
@@ -145,16 +145,19 @@ You will be creating a set of files under a new ``vagrant`` directory:
145
145
146
146
147
147
# install Apache
148
- class { 'apache': }
148
+ class { 'apache':
149
+ mpm_module => 'prefork',
150
+ }
149
151
class { 'apache::mod::php': }
150
152
151
153
152
154
# install MySQL
153
- class { 'mysql': }
154
- class { 'mysql::server':
155
- config_hash => { 'root_password' => 'symfony' },
155
+ class { '::mysql::server':
156
+ root_password => 'symfony',
157
+ }
158
+ class { '::mysql::bindings':
159
+ php_enable => true,
156
160
}
157
- class { 'mysql::php': }
158
161
159
162
160
163
# install Git for composer
@@ -164,7 +167,7 @@ You will be creating a set of files under a new ``vagrant`` directory:
164
167
# install PHP Extensions used with Symfony
165
168
class php-extensions {
166
169
package { ['php-apc', 'php5-intl', 'php5-xdebug']:
167
- ensure => latest ,
170
+ ensure => present ,
168
171
require => Package['httpd'],
169
172
notify => Service['httpd'],
170
173
}
@@ -176,6 +179,7 @@ You will be creating a set of files under a new ``vagrant`` directory:
176
179
# install a local composer.phar file
177
180
class composer {
178
181
exec { 'composerPhar':
182
+ user => 'vagrant',
179
183
cwd => '/vagrant',
180
184
command => 'curl -s http://getcomposer.org/installer | php',
181
185
path => ['/bin', '/usr/bin'],
@@ -194,13 +198,15 @@ You will be creating a set of files under a new ``vagrant`` directory:
194
198
# install the Symfony vendors using composer
195
199
class symfony {
196
200
exec { 'vendorsInstall':
197
- cwd => '/vagrant',
198
- command => 'php composer.phar install',
199
- timeout => 1200,
200
- path => ['/bin', '/usr/bin'],
201
- creates => '/vagrant/vendor',
202
- logoutput => true,
203
- require => Exec['composerPhar'],
201
+ user => 'vagrant',
202
+ cwd => '/vagrant',
203
+ environment => ['COMPOSER_HOME=/home/vagrant/.composer'],
204
+ command => 'php composer.phar install',
205
+ timeout => 1200,
206
+ path => ['/bin', '/usr/bin'],
207
+ creates => '/vagrant/vendor',
208
+ logoutput => true,
209
+ require => [ Class['php-extensions'], Exec['composerPhar'] ],
204
210
}
205
211
}
206
212
@@ -232,14 +238,16 @@ You will be creating a set of files under a new ``vagrant`` directory:
232
238
# by the web server
233
239
234
240
file_line { 'apache_user':
235
- path => '/etc/apache2/httpd.conf',
241
+ path => '/etc/apache2/apache2.conf',
242
+ match => 'User ',
236
243
line => 'User vagrant',
237
244
require => Package['httpd'],
238
245
notify => Service['httpd'],
239
246
}
240
247
241
248
file_line { 'apache_group':
242
- path => '/etc/apache2/httpd.conf',
249
+ path => '/etc/apache2/apache2.conf',
250
+ match => 'Group ',
243
251
line => 'Group vagrant',
244
252
require => Package['httpd'],
245
253
notify => Service['httpd'],
@@ -425,7 +433,7 @@ project without having to worry about your local server setup or the setup of
425
433
another developer's machine.
426
434
427
435
.. _`VirtualBox` : https://www.virtualbox.org/wiki/Downloads
428
- .. _`Vagrant` : http://downloads .vagrantup.com/
436
+ .. _`Vagrant` : http://www .vagrantup.com/downloads.html
429
437
.. _`Puppet` : http://www.puppetlabs.com/
430
438
.. _`Vagrant Docs` : http://docs.vagrantup.com/v2/
431
439
.. _`private network` : http://docs.vagrantup.com/v2/networking/private_network.html
0 commit comments