tobami / littlechef

Cook with Chef without a Chef Server
Apache License 2.0
472 stars 71 forks source link

Use ssh config to be able to use node alias #186

Closed tobami closed 10 years ago

tobami commented 10 years ago

FQDNs can be long. In order to spare some typing, ssh config's hostname resolving could be used.

For example, an org has FQDNs that follow the pattern: server0001.myorganization.com server0002.myorganization.com ...

In such a case it is common to define a directive in ~/.ssh/config like:

Host server????
  HostName %h.myorganization.com

so that you can type ssh server0001 instead of ssh server0001.myorganization.com

But to configure a node you still have to type: fix node:server0001.myorganization.com

Defining your node filenames with the shortcut, as in server0001.myorganization.com is not an option, as in can bring a host of problems, and Chef advises to always use FQDNs.

If LittleChef's node resolution used SSHConfig, you could instead type: fix node:server0001