From 3c4d703791612c37388a054cfc09366bb69ecb87 Mon Sep 17 00:00:00 2001 From: Ferry Boender Date: Sat, 8 Oct 2016 12:11:28 +0200 Subject: [PATCH] Return number of cpu's for vcpu's on OpenBSD in sql template --- src/ansiblecmdb/data/tpl/sql.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ansiblecmdb/data/tpl/sql.tpl b/src/ansiblecmdb/data/tpl/sql.tpl index 7e9c622..de623aa 100644 --- a/src/ansiblecmdb/data/tpl/sql.tpl +++ b/src/ansiblecmdb/data/tpl/sql.tpl @@ -52,7 +52,7 @@ from jsonxs import jsonxs %> <%def name="col_vcpus(host)"><% if jsonxs(host, 'ansible_facts.ansible_distribution', default='') in ["OpenBSD"]: - return 0 + return jsonxs(host, 'ansible_facts.ansible_processor_count', default=0) else: return jsonxs(host, 'ansible_facts.ansible_processor_vcpus', default=jsonxs(host, 'ansible_facts.ansible_processor_cores', default=0)) endif