Skip to content

Commit 702bac8

Browse files
committedMay 21, 2020
Run phpbrew init as vagrant user too.
1 parent 276a247 commit 702bac8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎manifests/init.pp

+12
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,18 @@
106106
refreshonly => true,
107107
}
108108

109+
# Init as vagrant user to use when need to switch php
110+
# and use it from vagrant console for example for composer command
111+
###################################################################
112+
exec { 'init phpbrew as vagrant':
113+
command => '/usr/bin/phpbrew init',
114+
creates => '/home/vagrant/.phpbrew/bashrc',
115+
subscribe => File['/usr/bin/phpbrew'],
116+
refreshonly => true,
117+
user => "vagrant",
118+
environment => ["HOME=/home/vagrant"],
119+
}
120+
109121
file { $php_install_dir:
110122
ensure => 'directory',
111123
require => Exec['init phpbrew'],

0 commit comments

Comments
 (0)