Skip to content

Commit

Permalink
Run phpbrew init as vagrant user too.
Browse files Browse the repository at this point in the history
  • Loading branch information
iatanasov77 committed May 21, 2020
1 parent 276a247 commit 702bac8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down

0 comments on commit 702bac8

Please sign in to comment.