summaryrefslogtreecommitdiff
path: root/vagrant/install-platform.pp
blob: 465ca78a6a7a6c3df2d1a0156064699f17d0c49c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
class {'apt': }
File['/etc/apt/preferences'] ->
  Exec['refresh_apt'] ->
  Package <| ( title != 'lsb' ) |>

package { [ 'rsync', 'ruby-hiera-puppet', 'git', 'ruby1.9.1-dev', 'rake', 'jq' ]:
  ensure => installed
}

file { '/etc/gemrc':
  content => "---\n:sources:\n  - https://rubygems.org/"
}

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' ]:
  ensure => directory
}