File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 105105 subscribe => File [' /usr/bin/phpbrew' ],
106106 refreshonly => true ,
107107 }
108-
108+
109109 file { $php_install_dir:
110110 ensure => ' directory' ,
111111 require => Exec[' init phpbrew' ],
124124
125125 # Load phpbrew configuration by default.
126126 if $system_wide {
127+ # ##################################################################
128+ # Init as vagrant user to use when need to switch php
129+ # and use it from vagrant console for example for composer command
130+ # ##################################################################
131+ exec { 'init phpbrew as vagrant' :
132+ command => ' /usr/bin/phpbrew init' ,
133+ creates => ' /home/vagrant/.phpbrew/bashrc' ,
134+ subscribe => File [' /usr/bin/phpbrew' ],
135+ refreshonly => true ,
136+ user => " vagrant" ,
137+ environment => [" HOME=/home/vagrant" ],
138+ }
139+
127140 file { '/opt/phpbrew/bashrc' :
128141 ensure => present ,
129142 content => template (' phpbrew/bashrc.erb' ),
You can’t perform that action at this time.
0 commit comments