Reference · reference
sys module
use sys reports facts about the operating system and hardware. Gatherers use it to publish the values that conditions in a playbook test. No function in this module fails. For the process environment and the current user, see the env module.
family
rust
family The operating system family: linux, windows or macos. Use it to guard a call into a Windows-only module.
os_name and os_version
rust
os_name os_version The name and version of the operating system. On Linux the name is the distribution name.
kernel_version
rust
kernel_version The kernel version string.
arch
rust
arch The CPU architecture, such as x86_64 or aarch64.
cpu_count
rust
cpu_count The number of logical CPUs.
total_memory and available_memory
rust
total_memory available_memory Physical memory in bytes: the total installed, and the amount available now.
rust
use sys
use value
Map "family": String,
"arch": String,
"cpus": Int
})
}