The /etc/hosts file can be managed to contain definitions for specific hosts:
salt-master:
host.present:
- ip: 192.168.0.42
Or using the names directive, you can put several names for the same IP. (Do not try one name with space-separated values).
server1:
host.present:
- ip: 192.168.0.42
- names:
- server1
- florida
Note
Changing the names in host.present does not cause an update to remove the old entry.
server1:
host.present:
- ip:
- 192.168.0.42
- 192.168.0.43
- 192.168.0.44
- names:
- server1
Ensure that the named host is absent
Ensures that the named host is present with the given ip
Docs for previous releases are available on salt.rtfd.org.
Latest Salt release: 2014.1.13
Try the shiny new release candidate of Salt, v2014.7.0rc6! More info here.
22.27.40. salt.states.htpasswd
Upcoming SaltStack events, webinars and local meet ups and user groups.