l3d.avahi_client
Ansible Role: Avahi Client
Avahi helps your system find local hostnames using the .local
domain through MDNS (Multicast DNS). This Ansible role installs what you need and sets up the DNS resolver.
Important Options
- If you don’t want to install a new
/etc/nsswitch.conf
configuration, setavahi_client__configure_nsswitch
tofalse
. - You can check for updates to avoid using an older version of this role by setting
submodules_versioncheck
totrue
.
Configuring nsswitch
If you only want to resolve IPv4 or IPv6 addresses, modify mdns
to mdns4
for IPv4 or mdns6
for IPv6 in these variables:
avahi_client__mdns_name: 'mdns'
avahi_client__mdns_minimal_name: 'mdns_minimal'
According to the nss-mdns documentation:
mdns
resolves both IPv4 and IPv6 addresses.mdns4
resolves only IPv4 addresses.mdns6
resolves only IPv6 addresses.- The minimal versions prevent resolving names that don’t end in
.local
or addresses outside the169.254.x.x
range.
Ansible Collection
This role is part of the l3d.avahi
Ansible Collection.
For more details on downloading or using this collection in your Ansible playbook, check the README.md.
Example of Using the Role
# Install the role
ansible-galaxy install l3d.avahi_client
- name: "Let your System use MDNS to resolve .local addresses"
hosts: localhost
roles:
- {role: l3d.avahi_client, tags: avahi}
vars:
# Enable optional version check
submodules_versioncheck: true
Learn More
Informazioni sul progetto
Avahi provides local hostname resolution using the ".local" MDNS Domain.
Installa
ansible-galaxy install l3d.avahi_client
Licenza
mit
Download
476
Proprietario
Ansible roles provide a framework for fully independent, or interdependent collections of variables,tasks,files,templates &modules. Here we maintain some. enjoy