cdist-type__hostname7
Set the hostname
Overview
Sets the hostname on various operating systems.
Tip: For advice on choosing a hostname, see RFC 1178.
Required parameters
None.
Optional parameters
name-
The hostname to set. Defaults to the first segment of __target_host (${__target_host%%.*})
Messages
changed-
Changed the hostname
Examples
# take hostname from __target_host __hostname # set hostname explicitly __hostname --name some-static-hostname
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.
History
- Debian 13 (Trixie): the text shown here
- Debian 12 (Bookworm)
- Debian 11 (Bullseye)
- Debian 10 (Buster)
- Debian 9 (Stretch)