Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ansible/ansible.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarshan <36774606+darshanip@users.noreply.github.com>2022-11-08 18:30:12 +0300
committerGitHub <noreply@github.com>2022-11-08 18:30:12 +0300
commiteae42ec57e9ab1f80bca478ca87f784c0c65260b (patch)
tree1d49001b9c0d97631ca8201e4c197f5a64e05a2d
parent4759590467faa23776f527e049a1686505339d4f (diff)
openbsd factgs, use physmem instead of usermem for total mem (#79316)
Signed-off-by: darshanip <darshancoding@gmail.com>
-rw-r--r--lib/ansible/module_utils/facts/hardware/openbsd.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/module_utils/facts/hardware/openbsd.py b/lib/ansible/module_utils/facts/hardware/openbsd.py
index 3bcf8ce41cb..145dcab0bf9 100644
--- a/lib/ansible/module_utils/facts/hardware/openbsd.py
+++ b/lib/ansible/module_utils/facts/hardware/openbsd.py
@@ -94,7 +94,7 @@ class OpenBSDHardware(Hardware):
rc, out, err = self.module.run_command("/usr/bin/vmstat")
if rc == 0:
memory_facts['memfree_mb'] = int(out.splitlines()[-1].split()[4]) // 1024
- memory_facts['memtotal_mb'] = int(self.sysctl['hw.usermem']) // 1024 // 1024
+ memory_facts['memtotal_mb'] = int(self.sysctl['hw.physmem']) // 1024 // 1024
# Get swapctl info. swapctl output looks like:
# total: 69268 1K-blocks allocated, 0 used, 69268 available