1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_avahi_client.git synced 2024-08-16 16:09:49 +02:00
Find a file
2023-10-28 18:07:34 +02:00
.github Improve linting 2023-10-28 18:07:34 +02:00
defaults Scope variables 2021-09-02 05:26:00 +02:00
meta Changing Icons and mention the l3d.avahi collection 2023-04-26 01:28:39 +02:00
tasks Improve linting 2023-10-28 18:07:34 +02:00
templates improve linting 2023-04-25 23:52:04 +02:00
vars Improve linting 2023-10-28 18:07:34 +02:00
.gitignore Initial commit 2021-09-02 01:44:09 +02:00
.yamllint Initial commit 2021-09-02 01:44:09 +02:00
LICENSE Initial commit 2021-09-02 01:44:09 +02:00
README.md Update galaxy url in readme 2023-10-05 22:20:36 +02:00

Ansible Galaxy MIT License Maintainance

ansible role avahi_client

Avahi provides local hostname resolution using the .local MDNS Domain. This ansible role installs the required dependencies and configures the DNS resolver accordingly.

You can opt-out from deploying a new /etc/nsswitch.conf config by setting avahi_client__configure_nsswitch to false.

You can opt-in in a simple versionscheck that can prevent you from running a older version of this role by setting submodules_versioncheck to true.

Configuring nsswitch

If you want only IPv4 or IPv6 names resolved, change mdns to mdns4 or mdns6 in these variables:

avahi_client__mdns_name: 'mdns'
avahi_client__mdns_minimal_name: 'mdns_minimal'

From the documentation of nss-mdns

mdns resolves both IPv6 and IPv4 addresses, mdns4 only IPv4 addresses and mdns6 only IPv6 addresses. mdns{4,6,}_minimal is mostly identical to the versions without _minimal. However, they differ in one way. The minimal versions will always deny to resolve host names that don't end in .local or addresses that aren't in the range 169.254.x.x (the range used by IPV4LL/APIPA/RFC3927.) Combining the _minimal and the normal NSS modules allows us to make mDNS authoritative for Zeroconf host names and addresses and use it as fallback for everything else.

Ansible Collection

This role is part of the l3d.avahi Ansible Collection.

collection l3d.avahi Maintainance License

Visit the README.md of the l3d.avahi collection for information about downloading or integrating the collection to your ansible playbook.

Role Usage Example:

# 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 Versioncheck.
    submodules_versioncheck: true

Learn more