mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add check for processor_core value
Fixes #21893 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
d834412ead
commit
8ad182059d
1 changed files with 1 additions and 1 deletions
|
@ -1204,7 +1204,7 @@ class LinuxHardware(Hardware):
|
||||||
self.facts['processor_count'] = i
|
self.facts['processor_count'] = i
|
||||||
|
|
||||||
socket_values = list(sockets.values())
|
socket_values = list(sockets.values())
|
||||||
if socket_values:
|
if socket_values and socket_values[0]:
|
||||||
self.facts['processor_cores'] = socket_values[0]
|
self.facts['processor_cores'] = socket_values[0]
|
||||||
else:
|
else:
|
||||||
self.facts['processor_cores'] = 1
|
self.facts['processor_cores'] = 1
|
||||||
|
|
Loading…
Reference in a new issue