diff options
Diffstat (limited to 'lib/leap_cli')
-rw-r--r-- | lib/leap_cli/leapfile.rb | 1 | ||||
-rw-r--r-- | lib/leap_cli/logger.rb | 26 | ||||
-rw-r--r-- | lib/leap_cli/remote/tasks.rb | 4 |
3 files changed, 17 insertions, 14 deletions
diff --git a/lib/leap_cli/leapfile.rb b/lib/leap_cli/leapfile.rb index c2bc10b..9164d0a 100644 --- a/lib/leap_cli/leapfile.rb +++ b/lib/leap_cli/leapfile.rb @@ -16,6 +16,7 @@ module LeapCli attr_accessor :leap_version attr_accessor :log attr_accessor :vagrant_network + attr_accessor :vagrant_basebox attr_accessor :environment def initialize diff --git a/lib/leap_cli/logger.rb b/lib/leap_cli/logger.rb index 328dc27..8b55bb3 100644 --- a/lib/leap_cli/logger.rb +++ b/lib/leap_cli/logger.rb @@ -113,7 +113,7 @@ module LeapCli { :match => /sh: .+: command not found/, :color => :magenta, :match_level => 1, :priority => -30 }, # IMPORTANT - { :match => /^err ::/, :color => :red, :match_level => 0, :priority => -10, :exit => 1}, + { :match => /^(E|e)rr ::/, :color => :red, :match_level => 0, :priority => -10, :exit => 1}, { :match => /^ERROR:/, :color => :red, :priority => -10, :exit => 1}, { :match => /.*/, :color => :blue, :match_level => 0, :priority => -20 }, @@ -129,19 +129,21 @@ module LeapCli { :match => /WARNING: The following packages cannot be authenticated!/, :color => :red, :level => 0, :priority => -10}, # PUPPET - { :match => /^warning: .*is deprecated.*$/, :level => 2, :color => :yellow, :priority => -10}, - { :match => /^warning: Scope.*$/, :level => 2, :color => :yellow, :priority => -10}, - { :match => /^notice:/, :level => 1, :color => :cyan, :priority => -20}, - { :match => /^notice:.*executed successfully$/, :level => 2, :color => :cyan, :priority => -15}, - { :match => /^warning:/, :level => 0, :color => :yellow, :priority => -20}, - { :match => /^Duplicate declaration:/, :level => 0, :color => :red, :priority => -20}, - { :match => /Finished catalog run/, :level => 0, :color => :green, :priority => -10}, + { :match => /^(W|w)arning: .*is deprecated.*$/, :level => 2, :color => :yellow, :priority => -10}, + { :match => /^(W|w)arning: Scope.*$/, :level => 2, :color => :yellow, :priority => -10}, + { :match => /^(N|n)otice:/, :level => 1, :color => :cyan, :priority => -20}, + { :match => /^(N|n)otice:.*executed successfully$/, :level => 2, :color => :cyan, :priority => -15}, + { :match => /^(W|w)arning:/, :level => 0, :color => :yellow, :priority => -20}, + { :match => /^Duplicate declaration:/, :level => 0, :color => :red, :priority => -20}, + { :match => /Finished catalog run/, :level => 0, :color => :green, :priority => -10}, { :match => /^APPLY COMPLETE \(changes made\)/, :level => 0, :color => :green, :priority => -10}, - { :match => /^APPLY COMPLETE \(no changes\)/, :level => 0, :color => :green, :priority => -10}, + { :match => /^APPLY COMPLETE \(no changes\)/, :level => 0, :color => :green, :priority => -10}, # PUPPET FATAL ERRORS - { :match => /^err:/, :level => 0, :color => :red, :priority => -1, :exit => 1}, + { :match => /^(E|e)rr(or|):/, :level => 0, :color => :red, :priority => -1, :exit => 1}, + { :match => /^Wrapped exception:/, :level => 0, :color => :red, :priority => -1, :exit => 1}, { :match => /^Failed to parse template/, :level => 0, :color => :red, :priority => -1, :exit => 1}, + { :match => /^Execution of.*returned/, :level => 0, :color => :red, :priority => -1, :exit => 1}, { :match => /^Parameter matches failed:/, :level => 0, :color => :red, :priority => -1, :exit => 1}, { :match => /^Syntax error/, :level => 0, :color => :red, :priority => -1, :exit => 1}, { :match => /^Cannot reassign variable/, :level => 0, :color => :red, :priority => -1, :exit => 1}, @@ -155,8 +157,8 @@ module LeapCli { :match => /\d+ tests: \d+ passes, \d+ skips, 0 warnings, 0 failures, 0 errors/, :color => :blue, :priority => -20}, # LOG SUPPRESSION - { :match => /^warning: You cannot collect without storeconfigs being set/, :level => 2, :priority => 10}, - { :match => /^warning: You cannot collect exported resources without storeconfigs being set/, :level => 2, :priority => 10} + { :match => /^(W|w)arning: You cannot collect without storeconfigs being set/, :level => 2, :priority => 10}, + { :match => /^(W|w)arning: You cannot collect exported resources without storeconfigs being set/, :level => 2, :priority => 10} ] def self.sorted_formatters diff --git a/lib/leap_cli/remote/tasks.rb b/lib/leap_cli/remote/tasks.rb index 048238d..b4d05d8 100644 --- a/lib/leap_cli/remote/tasks.rb +++ b/lib/leap_cli/remote/tasks.rb @@ -57,7 +57,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_wheezy_packages}] + run %[#{apt_get} install $( (egrep -q '(^wheezy|^7\.)' /etc/debian_version && echo #{leap.required_wheezy_packages}) || echo #{leap.required_packages} )] end #run "locale-gen" leap.mkdirs("/etc/leap", "/srv/leap") @@ -72,4 +72,4 @@ task :skip_errors_task, :on_error => :continue, :max_hosts => MAX_HOSTS do end task :standard_task, :max_hosts => MAX_HOSTS do -end
\ No newline at end of file +end |