1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #7544 from rik2803/patch-2

Differentiate machinfo output key/val separator
This commit is contained in:
James Cammarata 2014-05-27 13:53:12 -05:00
commit ca734fde8b

View file

@ -1311,8 +1311,11 @@ class HPUX(Hardware):
rc, out, err = module.run_command("model")
self.facts['model'] = out.strip()
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)
self.facts['firmware_version'] = out.split(':')[1].strip()
self.facts['firmware_version'] = out.split(separator)[1].strip()
class Darwin(Hardware):