fabric/fabric — Issue #542: Host aliases?
Author: mitchellh
Created: 2012-01-30 07:03:17+00:00
State: open

Howdy,

I don't know if this is actually a good idea or not, but it is one that would be particularly useful for me. When I manage some small clusters of servers I run side projects on, they often don't have legitimate global hostnames that I can access, so I just use the direct IP. However, when fabric runs, I would like to know what the server is.

Instead of just throwing the IPs in my `/etc/hosts`, It would be cool if I can just put them in the environment dictionary. What I'm imagining is something like the following:

```python
env.hosts = { "web1": "1.2.3.4", "web2": "2.3.4.5" }
```

That way when it runs it does this:

```
vagrant-installers master → fab update
[web1] Executing task 'update'
```

Anyways, I don't know if this is a good idea or there is actually an easier way to do this with Fabric, but its something that I've needed a few times.

Pip pip cheerio.