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:
commit
ca734fde8b
1 changed files with 4 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue