Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mivok/ansible-hosts

/etc/hosts management role
https://github.com/mivok/ansible-hosts

Last synced: 24 days ago
JSON representation

/etc/hosts management role

Awesome Lists containing this project

README

        

# Hosts role

This role will manage the hosts file on a server, providing IPs for every host
ansible manages. This is useful when you don't have DNS set up for each host
and you want to be able to connect from one host to another by name.

It uses the template module and completely takes over the hosts file, so don't
use this if you want to manage the hosts file with another tool also.

Note that ansible needs to collect facts for all hosts that need to be
included in the host file in the first play of the playbook.

## Example usage

This role doesn't take any configuration, as it just adds IPs for every host
managed. To use it, just add the role to your role list in a playbook:

---
- hosts: all
roles:
- hosts