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 #941 from wzzrd/devel

Add working CPU model fact for some ARM devices
This commit is contained in:
Michael DeHaan 2012-08-24 16:45:35 -07:00
commit 4ce5b0caea

View file

@ -246,7 +246,9 @@ class LinuxHardware(Hardware):
for line in open("/proc/cpuinfo").readlines():
data = line.split(":", 1)
key = data[0].strip()
if key == 'model name':
# model name is for Intel arch, Processor (mind the uppercase P)
# works for some ARM devices, like the Sheevaplug.
if key == 'model name' or key == 'Processor':
if 'processor' not in self.facts:
self.facts['processor'] = []
self.facts['processor'].append(data[1].strip())