community.general/lib/ansible/module_utils/facts
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
..
hardware facts: fix arm64 ansible_processor_vcpus = 0 2017-08-07 12:39:14 -04:00
network Support NetBSD 7.1+ style ifconfig -a output (#25442) 2017-06-08 17:09:22 -04:00
other Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
system Add Linux Mint to Debian OS family in setup facts 2017-06-12 09:27:03 -04:00
virtual Detect UEFI VMware guests (#26590) 2017-07-10 14:08:59 -04:00
__init__.py Add 2.0-2.3 facts api compat (ansible_facts(), get_all_facts()) (#27294) 2017-08-01 12:51:33 -04:00
ansible_collector.py Mv AnsibleFactCollector back to module_utils (#26150) 2017-07-11 10:44:22 -04:00
collector.py add a 'min' type for gather_subset to collect nothing (#27085) 2017-08-02 11:04:01 -04:00
compat.py Add 2.0-2.3 facts api compat (ansible_facts(), get_all_facts()) (#27294) 2017-08-01 12:51:33 -04:00
default_collectors.py Add 2.0-2.3 facts api compat (ansible_facts(), get_all_facts()) (#27294) 2017-08-01 12:51:33 -04:00
namespace.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
sysctl.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
timeout.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
utils.py More statvfs info for mount facts rebase 12073 (#25454) 2017-06-13 15:31:41 -04:00