Server Facts¶
server.Arch
¶
host.get_fact(Arch, )
rns the system architecture according to uname
.
server.Command
¶
host.get_fact(Command, command)
rns the raw output lines of a given command.
server.Date
¶
host.get_fact(Date, )
rns the current datetime on the server.
server.Groups
¶
host.get_fact(Groups, )
rns a list of groups on the system.
server.HasGui
¶
host.get_fact(HasGui)
rns a boolean indicating the remote side has GUI capabilities. Linux only.
server.Home
¶
host.get_fact(Home, user='')
rns the home directory of the given user, or the current user if no user is given.
server.Hostname
¶
host.get_fact(Hostname, )
rns the current hostname of the server.
server.Kernel
¶
host.get_fact(Kernel, )
rns the kernel name according to uname
.
server.KernelModules
¶
host.get_fact(KernelModules, )
rns a dictionary of kernel module name -> info.
ode:: python
- {
- “module_name”: {
“size”: 0, “instances”: 0, “state”: “Live”,
},
}
server.KernelVersion
¶
host.get_fact(KernelVersion, )
rns the kernel version according to uname
.
server.LinuxDistribution
¶
host.get_fact(LinuxDistribution, )
rns a dict of the Linux distribution version. Ubuntu, Debian, CentOS, ra & Gentoo currently. Also contains any key/value items located in ase files.
ode:: python
- {
“name”: “Ubuntu”, “major”: 20, “minor”: 04, “release_meta”: {
“CODENAME”: “focal”, “ID_LIKE”: “debian”, …
}
}
server.LinuxGui
¶
host.get_fact(LinuxGui, )
rns a list of available Linux GUIs.
server.LinuxName
¶
host.get_fact(LinuxName)
rns the name of the Linux distribution. Shortcut for st.get_fact(LinuxDistribution)[‘name’]``.
server.Locales
¶
host.get_fact(Locales, )
rns installed locales on the target host.
ode:: python
[“C.UTF-8”, “en_US.UTF-8”]
server.LsbRelease
¶
host.get_fact(LsbRelease, )
rns a dictionary of release information using lsb_release
.
ode:: python
- {
“id”: “Ubuntu”, “description”: “Ubuntu 18.04.2 LTS”, “release”: “18.04”, “codename”: “bionic”, …
}
server.MacosVersion
¶
host.get_fact(MacosVersion, )
rns the installed MacOS version.
server.Mounts
¶
host.get_fact(Mounts, )
rns a dictionary of mounted filesystems and information.
ode:: python
- {
- “/”: {
“device”: “/dev/mv2”, “type”: “ext4”, “options”: [
“rw”, “relatime”
]
},
}
server.Os
¶
host.get_fact(Os, )
rns the OS name according to uname
.
arning::
This fact is deprecated/renamed, please use the server.Kernel
fact.
server.OsRelease
¶
host.get_fact(OsRelease, )
rns a dictionary of release information stored in /etc/os-release
.
ode:: python
- {
“name”: “EndeavourOS”, “pretty_name”: “EndeavourOS”, “id”: “endeavouros”, “id_like”: “arch”, “build_id”: “2024.06.25”, …
}
server.OsVersion
¶
host.get_fact(OsVersion, )
rns the OS version according to uname
.
arning::
This fact is deprecated/renamed, please use the server.KernelVersion
fact.
server.Path
¶
host.get_fact(Path, )
rns the path environment variable of the current user.
server.Port
¶
host.get_fact(Port, port)
rns the process occuping a port and its PID
server.RebootRequired
¶
host.get_fact(RebootRequired, )
rns a boolean indicating whether the system requires a reboot.
inux systems: ecks /var/run/reboot-required and /var/run/reboot-required.pkgs
Alpine Linux, compares installed kernel with running kernel
reeBSD systems: mpares running kernel version with installed kernel version
server.SecurityLimits
¶
host.get_fact(SecurityLimits, )
rns a list of security limits on the target host.
ode:: python
- [
- {
“domain”: “*”, “limit_type”: “soft”, “item”: “nofile”, “value”: “1048576”
}, {
“domain”: “*”, “limit_type”: “hard”, “item”: “nofile”, “value”: “1048576”
}, {
“domain”: “root”, “limit_type”: “soft”, “item”: “nofile”, “value”: “1048576”
}, {
“domain”: “root”, “limit_type”: “hard”, “item”: “nofile”, “value”: “1048576”
}, {
“domain”: “*”, “limit_type”: “soft”, “item”: “memlock”, “value”: “unlimited”
}, {
“domain”: “*”, “limit_type”: “hard”, “item”: “memlock”, “value”: “unlimited”
}, {
“domain”: “root”, “limit_type”: “soft”, “item”: “memlock”, “value”: “unlimited”
}, {
“domain”: “root”, “limit_type”: “hard”, “item”: “memlock”, “value”: “unlimited”
}
]
server.Selinux
¶
host.get_fact(Selinux, )
overs the SELinux related facts on the target host.
ode:: python
- {
“mode”: “enabled”,
}
server.Sysctl
¶
host.get_fact(Sysctl, keys=None)
rns a dictionary of sysctl settings and values.
ode:: python
- {
“fs.inotify.max_queued_events”: 16384, “fs.inode-state”: [
44565, 360,
],
}
server.TmpDir
¶
host.get_fact(TmpDir, )
rns the temporary directory of the current server, if configured.
server.User
¶
host.get_fact(User, )
rns the name of the current user.
server.Users
¶
host.get_fact(Users, )
rns a dictionary of users -> details.
ode:: python
- {
- “user_name”: {
“comment”: “Full Name”, “home”: “/home/user_name”, “shell”: “/bin/bash, “group”: “main_user_group”, “groups”: [
“other”, “groups”
], “uid”: user_id, “gid”: main_user_group_id, “lastlog”: last_login_time, “password”: encrypted_password,
},
}
server.Which
¶
host.get_fact(Which, command)
rns the path of a given command according to command -v, if available.