diff --git a/manifests/init.pp b/manifests/init.pp index 0286446..aa229c3 100755 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -106,6 +106,18 @@ refreshonly => true, } + # Init as vagrant user to use when need to switch php + # and use it from vagrant console for example for composer command + ################################################################### + exec { 'init phpbrew as vagrant': + command => '/usr/bin/phpbrew init', + creates => '/home/vagrant/.phpbrew/bashrc', + subscribe => File['/usr/bin/phpbrew'], + refreshonly => true, + user => "vagrant", + environment => ["HOME=/home/vagrant"], + } + file { $php_install_dir: ensure => 'directory', require => Exec['init phpbrew'],