Need help with genhost?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

elasticdog
211 Stars 42 Forks 21 Commits 2 Opened issues

Description

generate unused hostnames by randomly picking from a word list

Services available

!
?

Need anything else?

Contributors list

# 88,551
c-plus-...
TypeScr...
viml
sift
9 commits
# 331,494
Python
Shell
podman
3 commits
# 444,898
userage...
HTML
Shell
JavaScr...
1 commit
# 605,739
Shell
1 commit

genhost

This script will randomly generate hostnames by picking words from the provided word list. The pool of words comes from Oren Tirosh's mnemonic encoding project.

Usage

Just run the script and provide the number of hostnames you'd like to generate:

$ ./genhost 4
romeo.example.com
holiday.example.com
jester.example.com
spiral.example.com

All of those words will automatically be commented out in the word list and thus removed from the pool of future names. If a hostname has the potential to be confusing based on technical jargon (like

email.example.com
), simply ignore it and generate a replacement.

If you decommission a server, you can return its hostname to the usable pool, thereby uncommenting it in the wordlist:

$ ./genhost reuse jester

You can also print a list of the hostnames currently marked as in use:

$ ./genhost list
romeo
holiday
spiral

For collaboration purposes, don't forget to commit the updated word list back to a shared Git repository so names do not get reused:

$ git add wordlist
$ git commit
$ git push

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.