tobami/littlechef — Issue #78: Mapping a host to an IP using HostName in ssh/config breaks ssh
Author: tobami
Created: 2012-01-05 16:51:10+00:00
State: open
Labels: BUG

Robin [reported a problem](http://groups.google.com/group/littlechef/browse_thread/thread/eaa5e2d85e4594d1) on the discussion group:
If the ssh/config contains something like:
`Host h1
HostName
User root `

, fabric will not correctly resolve the host, because it uses `host_string` which LittleChef sets to `h1`.

That can be easily solved with the following patch:
https://github.com/tobami/littlechef/blob/master/littlechef/lib.py#L386
+ if 'hostname' in credentials:
+ credentials['host_string'] = credentials['hostname']
The problem is that from then on LittleChef will think that the node is called "", and will save a node file called ".json".