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 πŸ’…


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