Skip to content

Instantly share code, notes, and snippets.

@vinyar
Last active August 29, 2015 14:27
Show Gist options
  • Save vinyar/0c0d83f376e7f3590255 to your computer and use it in GitHub Desktop.
Save vinyar/0c0d83f376e7f3590255 to your computer and use it in GitHub Desktop.
Pulling out pega space requirements via ruby
require 'nokogiri'
file = File.open('/pega_cookbook/files/default/prpcUtils.xml')
doc = Nokogiri::XML(f)
needed = doc.xpath("//pega:hasenoughspace/@needed").text
raise 'Not enough space available for Pega deployment' if node['filesystem']['/dev/xvda1']['kb_available'] < needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment