ansible/ansible — pull request #4050 by resmo (2013-09-06 11:30:53+00:00)
Title: added new module host 2nd try

Add or remove entries in /etc/hosts using tasks:

- host: ip=127.0.0.1 hostname=localhost aliases=foobar.com,localhost.foobar.com
- host: ip=127.0.0.1 hostname=localhost state=present
- host: ip=192.168.1.1 state=absent
- host: hostname=localhost state=absent
- host: ip=::1 hostname=localhost aliases=ip6-localhost,ip6-loopback

I already made a pull request https://github.com/ansible/ansible/pull/3949 for an older version.

I just wanted to let you know and wanted you to look at it again and if it still can not be in ansible core.

The possibility to managed host entries as action is quite common, other (not that easy) config management solutions also have a resource for it (http://docs.puppetlabs.com/references/latest/type.html#host).

People can still decide to use this module or manage host entries using templates or file action of course, but I think it is simple, easy and common enough to be in ansible core.

Thanks in advance.