community.general/lib/ansible/module_utils/facts/hardware
Zhangfei Gao ce4ada93f9 facts: fix arm64 ansible_processor_vcpus = 0
On arm64, /proc/cpuinfo has no 'model name', 'Processor', 'vendor_id', 'cpu', 'Vendor',
as a resul "ansible_processor_count": 0 & "ansible_processor_vcpus": 0
Add checking element "processor" to fix the issue.

$ ansible -i ~/all-in-one  -m setup all | grep proc
	"ansible_processor": [],
	"ansible_processor_cores": 1,
	"ansible_processor_count": 0,
	"ansible_processor_threads_per_core": 1,
	"ansible_processor_vcpus": 0,

$ cat /proc/cpuinfo
processor	: 0
BogoMIPS	: 100.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x1
CPU part	: 0xd07
CPU revision	: 1

$ ansible --version
ansible 2.3.1.0
config file =
configured module search path = Default w/o overrides
python version = 2.7.9 (default, Aug 13 2016, 16:27:01) [GCC 4.9.2]

With fix, checking processor as well:
$ ansible -i ~/all-in-one  -m setup all | grep proc
	"ansible_processor": [
	"ansible_processor_cores": 1,
	"ansible_processor_count": 16,
	"ansible_processor_threads_per_core": 1,
	"ansible_processor_vcpus": 16,

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
2017-08-07 12:39:14 -04:00
..
__init__.py
aix.py Check / Skip cores for AIX5 Series (#25364) 2017-06-06 10:43:13 -04:00
base.py
darwin.py
dragonfly.py
freebsd.py More statvfs info for mount facts rebase 12073 (#25454) 2017-06-13 15:31:41 -04:00
hpux.py Fix HPUX cpu facts on HP Integrity VM's (#25369) 2017-06-07 13:43:54 -04:00
hurd.py
linux.py facts: fix arm64 ansible_processor_vcpus = 0 2017-08-07 12:39:14 -04:00
netbsd.py More statvfs info for mount facts rebase 12073 (#25454) 2017-06-13 15:31:41 -04:00
openbsd.py More statvfs info for mount facts rebase 12073 (#25454) 2017-06-13 15:31:41 -04:00
sunos.py More statvfs info for mount facts rebase 12073 (#25454) 2017-06-13 15:31:41 -04:00