1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_avahi_daemon.git synced 2024-08-16 15:09:48 +02:00
Find a file
2021-09-02 02:14:01 +02:00
.github improve galaxy image 2021-09-02 01:10:22 +02:00
defaults create transport option 2021-09-02 02:10:18 +02:00
handlers Announce first avahi service 2021-09-02 00:24:53 +02:00
meta configure avahi variables 2021-09-02 01:36:13 +02:00
tasks no ansible lint test because systemd usage 2021-09-02 00:59:27 +02:00
templates create transport option 2021-09-02 02:10:18 +02:00
vars create transport option 2021-09-02 02:10:18 +02:00
.gitignore Initial commit 2021-09-01 23:07:51 +02:00
.yamllint Initial commit 2021-09-01 23:07:51 +02:00
LICENSE Initial commit 2021-09-01 23:07:51 +02:00
README.md create transport option 2021-09-02 02:10:18 +02:00

Galaxy License

ansible role avahi_daemon

Ansible role to install the avahi_daemon and optionally announce some services.

Variables

In the avahi_services variable you can define the services you want to announce. Here is a list with available parameters:

  • service: Service Name (HTTP/SSH/...) (required)
  • port: Service Port (required)
  • name: optional name to announce the Service
  • protocol: any/ipv6/ipv4
  • txt_records: an array of txt records
  • transport: Transport Protokoll (tcp/udp)

Example:

---
avahi_services:
  - service: 'SSH'
    port: 22
    protocol: 'any'
    transport: 'tcp'
  - service: 'NFS'
    name: 'Filesharing Host %h'
    port: 2049
    protocol: 'ipv6'
    txt_records:
      - 'path=/path/to/nfsexport'
  - service: 'FTP'
    port: '21'
    protocol: 'ipv4'
    txt_records:
      - 'path=/ftppath'
      - 'u=ftpuser'
      - 'p=ftppass'

Netfilter rules

Avahi is using multicast to announce services. Do not forget to add netfilter rules for multicast dns.

Configuration example for ferm:

# mdns
daddr 224.0.0.251 proto udp dport 5353 ACCEPT;
daddr ff02::fb proto udp dport 5353 ACCEPT;