Bug #562 ยป patch.diff
puts
|
||
puts "Please fix these issues and try again"
|
||
else
|
||
Rails.logger "Failed to refresh puppet classes:" + e.message
|
||
Rails.logger.warn "Failed to refresh puppet classes: #{e}"
|
||
end
|
||
exit
|
||
end
|
||
unless changes[:new][:environments].empty? and changes[:new][:puppetclasses].empty? and
|
||
changes[:obsolete][:environments].empty? and changes[:obsolete][:puppetclasses].empty?
|
||
unless args.batch
|
||
puts "Scheduled changes to your environment"
|
||
puts "New environments : " + changes[:new][:environments].to_sentence
|
||
puts "Obsolete environments : " + changes[:obsolete][:environments].to_sentence
|
||
puts "New puppetclasses : " + changes[:new][:puppetclasses].to_sentence
|
||
puts "Obsolete puppetclasses : " + changes[:obsolete][:puppetclasses].to_sentence
|
||
unless args.batch
|
||
puts
|
||
print "Proceed with these modifications? <yes|no> "
|
||
response = $stdin.gets
|
||
... | ... | |
puts "Import complete"
|
||
end
|
||
else
|
||
Rails.logger "Failed to refresh puppet classes:" + errors
|
||
Rails.logger.warn "Failed to refresh puppet classes: #{errors}"
|
||
end
|
||
else
|
||
puts "No changes detected" unless args.batch
|