Handle facts for HP-UX 9000/785 architecture (#33333)

This fix adds support for HP-UX '9000/785' architecture.

Fixes: #31976

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2018-01-18 23:56:42 +05:30 committed by Adrian Likins
parent 2fd5a99989
commit 0a86287a92

View file

@ -55,7 +55,7 @@ class HPUXHardware(Hardware):
cpu_facts = {}
collected_facts = collected_facts or {}
if collected_facts.get('ansible_architecture') == '9000/800':
if collected_facts.get('ansible_architecture') in ['9000/800', '9000/785']:
rc, out, err = self.module.run_command("ioscan -FkCprocessor | wc -l", use_unsafe_shell=True)
cpu_facts['processor_count'] = int(out.strip())
# Working with machinfo mess
@ -111,7 +111,7 @@ class HPUXHardware(Hardware):
rc, out, err = self.module.run_command("/usr/bin/vmstat | tail -1", use_unsafe_shell=True)
data = int(re.sub(' +', ' ', out).split(' ')[5].strip())
memory_facts['memfree_mb'] = pagesize * data // 1024 // 1024
if collected_facts.get('ansible_architecture') == '9000/800':
if collected_facts.get('ansible_architecture') in ['9000/800', '9000/785']:
try:
rc, out, err = self.module.run_command("grep Physical /var/adm/syslog/syslog.log")
data = re.search('.*Physical: ([0-9]*) Kbytes.*', out).groups()[0].strip()