Sha256: f3281d85d9286c4dba2917e2a4152ce044065042c49895cf853093966cd70624
Contents?: true
Size: 1.67 KB
Versions: 6
Compression:
Stored size: 1.67 KB
Contents
$ar_databases = ['activerecord_unittest', 'activerecord_unittest2'] $as_vagrant = 'sudo -u vagrant -H bash -l -c' $home = '/home/vagrant' Exec { path => ['/usr/sbin', '/usr/bin', '/sbin', '/bin'] } # --- Preinstall Stage --------------------------------------------------------- stage { 'preinstall': before => Stage['main'] } class apt_get_update { exec { 'apt-get -y update': unless => "test -e ${home}/.rvm" } } class { 'apt_get_update': stage => preinstall } # --- Packages ----------------------------------------------------------------- package { 'curl': ensure => installed } package { 'build-essential': ensure => installed } package { 'git-core': ensure => installed } # Nokogiri dependencies. package { ['libxml2', 'libxml2-dev', 'libxslt1-dev']: ensure => installed } # --- Ruby --------------------------------------------------------------------- exec { 'install_rvm': command => "${as_vagrant} 'curl -L https://get.rvm.io | bash -s stable'", creates => "${home}/.rvm/bin/rvm", require => Package['curl'] } exec { 'install_ruby': # We run the rvm executable directly because the shell function assumes an # interactive environment, in particular to display messages or ask questions. # The rvm executable is more suitable for automated installs. # # Thanks to @mpapis for this tip. command => "${as_vagrant} '${home}/.rvm/bin/rvm install 1.9.3 --latest-binary --autolibs=enabled && rvm --fuzzy alias create default 1.9.3'", creates => "${home}/.rvm/bin/ruby", require => Exec['install_rvm'] } exec { "${as_vagrant} 'gem install bundler --no-rdoc --no-ri'": creates => "${home}/.rvm/bin/bundle", require => Exec['install_ruby'] }
Version data entries
6 entries across 6 versions & 1 rubygems