mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
There's no need to filter hostnamectl's output with awk because its man page says: hostnamectl [OPTIONS...] {COMMAND} --static, --transient, --pretty If status is used (or no explicit command is given) and one of those fields is given, hostnamectl will print out just this selected hostname. E.g. hostnamectl --static status => ansible.example.org |
||
---|---|---|
.. | ||
at | ||
authorized_key | ||
cron | ||
debconf | ||
facter | ||
filesystem | ||
firewalld | ||
group | ||
hostname | ||
kernel_blacklist | ||
locale_gen | ||
lvg | ||
lvol | ||
modprobe | ||
mount | ||
ohai | ||
open_iscsi | ||
ping | ||
seboolean | ||
selinux | ||
service | ||
setup | ||
sysctl | ||
ufw | ||
user | ||
zfs |