From 36540162129243596a5ce1ecc00c999ba5ddc849 Mon Sep 17 00:00:00 2001 From: varac Date: Mon, 4 May 2015 20:09:40 +0200 Subject: moved leap_cli installation to leap module Change-Id: I385f7877d0816456e7c57179511604645a4740bc --- puppet/modules/leap/manifests/cli/install.pp | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 puppet/modules/leap/manifests/cli/install.pp (limited to 'puppet/modules/leap/manifests/cli') diff --git a/puppet/modules/leap/manifests/cli/install.pp b/puppet/modules/leap/manifests/cli/install.pp new file mode 100644 index 00000000..858bd7da --- /dev/null +++ b/puppet/modules/leap/manifests/cli/install.pp @@ -0,0 +1,33 @@ +# installs leap_cli on node +class leap::cli::install ( $source = false ) { + if $source { + # needed for building leap_cli from source + include ::git + include ::site_config::ruby::dev + + vcsrepo { '/srv/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/cli', + refreshonly => true, + require => [ Package['ruby-dev'], File['/etc/gemrc'], Package['rake'] ] + } + } + else { + package { 'leap_cli': + ensure => installed, + provider => gem + } + } +} -- cgit v1.2.3 From 14b40366ba6ce03af9b624d27e626bb4ef5b342b Mon Sep 17 00:00:00 2001 From: varac Date: Wed, 23 Dec 2015 15:44:47 +0100 Subject: [bug] Fix leap::cli::install on jessie leap_cli could not get installed from source on jessie --- puppet/modules/leap/manifests/cli/install.pp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'puppet/modules/leap/manifests/cli') diff --git a/puppet/modules/leap/manifests/cli/install.pp b/puppet/modules/leap/manifests/cli/install.pp index 858bd7da..6a12a4a5 100644 --- a/puppet/modules/leap/manifests/cli/install.pp +++ b/puppet/modules/leap/manifests/cli/install.pp @@ -3,7 +3,20 @@ class leap::cli::install ( $source = false ) { if $source { # needed for building leap_cli from source include ::git - include ::site_config::ruby::dev + include ::rubygems + include ::site_config::packages::build_essential + + class { '::ruby': + install_dev => true + } + + class { 'bundler::install': install_method => 'package' } + + Class[Ruby] -> + Class[rubygems] -> + Class[::site_config::packages::build_essential] -> + Class[bundler::install] + vcsrepo { '/srv/leap/cli': ensure => present, @@ -20,8 +33,10 @@ class leap::cli::install ( $source = false ) { exec { 'install_leap_cli': command => '/usr/bin/rake build && /usr/bin/rake install', cwd => '/srv/leap/cli', + user => 'root', + environment => 'USER=root', refreshonly => true, - require => [ Package['ruby-dev'], File['/etc/gemrc'], Package['rake'] ] + require => [ Class[bundler::install] ] } } else { -- cgit v1.2.3 From 6c8d3a7639af50266a56ed0661006280c7198b2f Mon Sep 17 00:00:00 2001 From: varac Date: Thu, 25 Feb 2016 09:46:07 +0100 Subject: no build-essential packages needed for building leap_cli --- puppet/modules/leap/manifests/cli/install.pp | 2 -- 1 file changed, 2 deletions(-) (limited to 'puppet/modules/leap/manifests/cli') diff --git a/puppet/modules/leap/manifests/cli/install.pp b/puppet/modules/leap/manifests/cli/install.pp index 6a12a4a5..25e87033 100644 --- a/puppet/modules/leap/manifests/cli/install.pp +++ b/puppet/modules/leap/manifests/cli/install.pp @@ -4,7 +4,6 @@ class leap::cli::install ( $source = false ) { # needed for building leap_cli from source include ::git include ::rubygems - include ::site_config::packages::build_essential class { '::ruby': install_dev => true @@ -14,7 +13,6 @@ class leap::cli::install ( $source = false ) { Class[Ruby] -> Class[rubygems] -> - Class[::site_config::packages::build_essential] -> Class[bundler::install] -- cgit v1.2.3