diff options
-rwxr-xr-x | vagrant/install-platform.pp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/vagrant/install-platform.pp b/vagrant/install-platform.pp index 30f0b1e6..465ca78a 100755 --- a/vagrant/install-platform.pp +++ b/vagrant/install-platform.pp @@ -11,10 +11,23 @@ file { '/etc/gemrc': content => "---\n:sources:\n - https://rubygems.org/" } -package { 'leap_cli': - ensure => latest, - provider => 'gem', - require => [ Package['ruby1.9.1-dev'], File['/etc/gemrc'] ] +vcsrepo { '/srv/leap/leap_cli': + ensure => present, + force => true, + revision => 'develop', + provider => 'git', + source => 'https://leap.se/git/leap_cli.git', + owner => 'root', + group => 'root', + notify => Exec['install_leap_cli'], + require => Package['git'] +} + +exec { 'install_leap_cli': + command => '/usr/bin/rake build && /usr/bin/rake install', + cwd => '/srv/leap/leap_cli', + refreshonly => true, + require => [ Package['ruby1.9.1-dev'], File['/etc/gemrc'], Package['rake'] ] } file { [ '/srv/leap', '/srv/leap/configuration', '/var/log/leap' ]: |