Merge pull request #7544 from rik2803/patch-2

Differentiate machinfo output key/val separator
pull/7609/head
James Cammarata 11 years ago
commit ca734fde8b

@ -1311,8 +1311,11 @@ class HPUX(Hardware):
rc, out, err = module.run_command("model") rc, out, err = module.run_command("model")
self.facts['model'] = out.strip() self.facts['model'] = out.strip()
if self.facts['architecture'] == 'ia64': if self.facts['architecture'] == 'ia64':
separator = ':'
if self.facts['distribution_version'] == "B.11.23":
separator = '='
rc, out, err = module.run_command("/usr/contrib/bin/machinfo |grep -i 'Firmware revision' | grep -v BMC", use_unsafe_shell=True) rc, out, err = module.run_command("/usr/contrib/bin/machinfo |grep -i 'Firmware revision' | grep -v BMC", use_unsafe_shell=True)
self.facts['firmware_version'] = out.split(':')[1].strip() self.facts['firmware_version'] = out.split(separator)[1].strip()
class Darwin(Hardware): class Darwin(Hardware):

Loading…
Cancel
Save