Closed deiga closed 11 years ago
foo@bar.baz, hostname: 'bar', description: 'This box is the shared box for out Bar friends. I have sudo access. I maintain MySQL and Trac on this box'
Thanks for the description. I will think about this. I want to keep the format of the hosts
file as simple as possible, and keep it open for future extension. We could even think about splitting the hosts file into separate directories per host. (E.g. etc/hosts/foo.bar.com/{config,description,…}
.
should be able to use ssh-config information when it connects
This should work right now. SSH config information from ~/.ssh/config
should be read automatically by SSH. Did I misunderstand you?
Ah, no. I was just a bit too unspecific :)
In the example below the config is only used if you connect to ssh this-is-not-bar
, so that is what I mean with specifying the hostname to use
Host this-is-not-bar
Hostname bar.com
User foo
Ah, I understand now. This used to “just work” because all tasks were SSH based. Now when we have ping
and such, we can not use SSH aliases directly. I’ll try to find a good solution. Thanks again!
Commit 7a2e91a enables you to add comments to the etc/hosts file. This allows you to add simple comments describing your hosts. box ls
will print these comments:
$ box ls
iv@signal.wolverian.net # foo bar
iv@lilo.wolverian.net # quux
test@wolverian.net # something else
Does this satisfy your immediate use case? I will add a separate bug about the SSH aliases.
Added SSH aliases as #11.
Could you give me an example of what kind of descriptions you would use for your boxes? I want to make sure I understand your use case. I can imagine using descriptions myself, but let's see if our ideas are really the same.
In addition to the descriptions themselves, how would you like to configure them? Put them in etc/hosts? What kind of syntax would you like to see?