saltstack/salt — pull request #6683 by kevinastone (2013-08-13 21:35:06+00:00)
Title: Update host/ip pairing rather than add the hostname a second time

It makes more sense (to me) that the `host.present` should replace existing ip/host pairings rather than add them again. We use this to update hostname mappings as a cheap internal DNS substitute. Works great with pillar defined networks (pillar/production.sls pillar/staging.sls, etc):

```
{% for host, address in pillar.get("hosts", {}).items() %}
"{{ host }}_host_entry":
host.present:
- name: {{ host }}
- ip: {{ address }}
{% endfor %}
```