From 5130afca6ff1f5ec49b8abeaccfbe17dec129e32 Mon Sep 17 00:00:00 2001 From: elijah Date: Sun, 8 Feb 2015 13:01:19 -0800 Subject: pass --info to puppet_command (needed to support logging deploy details) --- lib/leap_cli/remote/puppet_plugin.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/leap_cli/remote') diff --git a/lib/leap_cli/remote/puppet_plugin.rb b/lib/leap_cli/remote/puppet_plugin.rb index e3f6be2..77bb4a3 100644 --- a/lib/leap_cli/remote/puppet_plugin.rb +++ b/lib/leap_cli/remote/puppet_plugin.rb @@ -18,7 +18,7 @@ module LeapCli; module Remote; module PuppetPlugin elsif item[1] === true str << "--" + item[0].to_s else - str << "--" + item[0].to_s + " " + item[1].to_s + str << "--" + item[0].to_s + " " + item[1].inspect end }.join(' ') end -- cgit v1.2.3 From 4d1872b1b6fee85e30f7ec71af38f2f28d816b04 Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 25 Feb 2015 09:40:21 -0800 Subject: set Aquire::Languages=none for apt-get update. --- lib/leap_cli/remote/tasks.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/leap_cli/remote') diff --git a/lib/leap_cli/remote/tasks.rb b/lib/leap_cli/remote/tasks.rb index 7fd8d64..38a440c 100644 --- a/lib/leap_cli/remote/tasks.rb +++ b/lib/leap_cli/remote/tasks.rb @@ -34,10 +34,11 @@ BAD_APT_GET_UPDATE = /(BADSIG|NO_PUBKEY|KEYEXPIRED|REVKEYSIG|NODATA)/ task :install_prerequisites, :max_hosts => MAX_HOSTS do apt_get = "DEBIAN_FRONTEND=noninteractive apt-get -q -y -o DPkg::Options::=--force-confold" + apt_get_update = "apt-get update -o Acquire::Languages=none" leap.mkdirs Leap::Platform.leap_dir run "echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen" leap.log :updating, "package list" do - run "apt-get update" do |channel, stream, data| + run apt_get_update do |channel, stream, data| # sadly exitcode is unreliable measure if apt-get update hit a failure. if data =~ BAD_APT_GET_UPDATE LeapCli::Util.bail! do -- cgit v1.2.3 From ddd160afb1fd2c729cf806de879add5a15cafe31 Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 8 Apr 2015 18:14:09 -0700 Subject: added `leap history` command to dump the recent deploy history to console --- lib/leap_cli/remote/leap_plugin.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/leap_cli/remote') diff --git a/lib/leap_cli/remote/leap_plugin.rb b/lib/leap_cli/remote/leap_plugin.rb index af88c2a..c155097 100644 --- a/lib/leap_cli/remote/leap_plugin.rb +++ b/lib/leap_cli/remote/leap_plugin.rb @@ -60,6 +60,13 @@ module LeapCli; module Remote; module LeapPlugin run "touch #{Leap::Platform.init_path}" end + # + # dumps the recent deploy history to the console + # + def history + run "(test -s /var/log/leap/deploy-summary.log && tail /var/log/leap/deploy-summary.log) || (test -s /var/log/leap/deploy-summary.log.1 && tail /var/log/leap/deploy-summary.log.1) || (echo 'no history')" + end + # # This is a hairy ugly hack, exactly the kind of stuff that makes ruby # dangerous and too much fun for its own good. -- cgit v1.2.3 From b4d0e0e3b4bfa2436e3f76a591d5639819a4853b Mon Sep 17 00:00:00 2001 From: elijah Date: Mon, 4 May 2015 15:11:46 -0700 Subject: remove ruby-hiera-puppet from list of required packages (except for wheezy) closes #6918 --- lib/leap_cli/remote/leap_plugin.rb | 4 ++++ lib/leap_cli/remote/tasks.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/leap_cli/remote') diff --git a/lib/leap_cli/remote/leap_plugin.rb b/lib/leap_cli/remote/leap_plugin.rb index c155097..e425842 100644 --- a/lib/leap_cli/remote/leap_plugin.rb +++ b/lib/leap_cli/remote/leap_plugin.rb @@ -6,6 +6,10 @@ module LeapCli; module Remote; module LeapPlugin def required_packages + "puppet rsync lsb-release locales" + end + + def required_wheezy_packages "puppet ruby-hiera-puppet rsync lsb-release locales" end diff --git a/lib/leap_cli/remote/tasks.rb b/lib/leap_cli/remote/tasks.rb index 38a440c..ab60a51 100644 --- a/lib/leap_cli/remote/tasks.rb +++ b/lib/leap_cli/remote/tasks.rb @@ -58,7 +58,7 @@ task :install_prerequisites, :max_hosts => MAX_HOSTS do run "( test -f /etc/init.d/ntp && /etc/init.d/ntp start ) || true" end leap.log :installing, "required packages" do - run "#{apt_get} install #{leap.required_packages}" + run %[#{apt_get} install $( (grep -q wheezy /etc/debian_version && echo #{leap.required_wheezy_packages}) || echo #{leap.required_packages} )] end #run "locale-gen" leap.mkdirs("/etc/leap", "/srv/leap") -- cgit v1.2.3