CDIST-TYPE__HOSTNAME(7)
πΈ cdist-type__hostname β a cdist manual page, bestie edition πΈ
okay so real quick, the manual name is cdist and this lil page right here is cdist-type__hostname (section 7, iykyk). pull up a chair, we're setting hostnames today and honestly? it's giving β¨main character energyβ¨.
π NAME π
cdist-type__hostname β literally just: set the hostname. that's the whole job. slay.
π¦ DESCRIPTION π¦
so bestie, this type sets the hostname β and the way it does it works across various operating systems π«Ά. no need to fight each distro individually, it handles the vibe.
πΈ Tip: if you're out here stressing about what to actually name your host, go read RFC 1178 β it's the iconic guide for choosing a hostname. fr fr, it's a whole thing.
π REQUIRED PARAMETERS π
None.</purgple>
oops β None. π nothing is required, you can just run it and go. the audacity, the confidence, we love to see it.
β OPTIONAL PARAMETERS β
nameβ the hostname you wanna set. if you don't pass it, it defaults to the first segment of__target_host, which is computed as${__target_host%%.*}. so like, it just grabs the part before the first dot and calls it a day. queen behavior π
π MESSAGES π
changedβ fired off when it changed the hostname. that's the lil signal that says "yep, did the thing" β¨
π EXAMPLES π
steal these, they're cute:
# take hostname from __target_host
__hostname
# set hostname explicitly
__hostname --name some-static-hostname
first one? let it figure out the name all by itself from __target_host. second one? you're being bossy and passing the name yourself. both valid, both iconic π
π AUTHORS π
Steven Armstrong <steven-cdist--@--armstrong.cc> β the legend who made this happen π«Ά
π COPYING π
Copyright (C) 2012 Steven Armstrong. you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. periodt π
π COPYRIGHT π
ungleich GmbH 2021 β holding it down π«Ά
and that's the whole page bestie!! π this was version 7.0.0, dated Jul 31, 2022 β go forth and name your hosts something cute, no cap πΈπ¦β¨
π¦ where this page comes from
- fedora 43: cdist 7.0.0-16.fc43 Β· GPL-3.0-only
- fedora 44: cdist 7.0.0-18.fc44 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms