From 53da61f9842dac546eec33cec3e06e288655bdd5 Mon Sep 17 00:00:00 2001 From: L3D Date: Thu, 2 Sep 2021 02:10:18 +0200 Subject: [PATCH] create transport option --- README.md | 2 ++ defaults/main.yml | 1 + templates/avahi.service.j2 | 2 +- vars/main.yml | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1b055b9..cba8c48 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Here is a list with available parameters: - ``name``: optional name to announce the Service - ``protocol``: ``any``/``ipv6``/``ipv4`` - ``txt_records``: an array of txt records + - ``transport``: Transport Protokoll (``tcp``/``udp``) Example: @@ -23,6 +24,7 @@ avahi_services: - service: 'SSH' port: 22 protocol: 'any' + transport: 'tcp' - service: 'NFS' name: 'Filesharing Host %h' port: 2049 diff --git a/defaults/main.yml b/defaults/main.yml index f2b4067..e786467 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -3,6 +3,7 @@ avahi_services: - service: 'SSH' port: 22 protocol: 'any' + transport: 'tcp' # - service: 'NFS' # name: 'Filesharing Host %h' # port: 2049 diff --git a/templates/avahi.service.j2 b/templates/avahi.service.j2 index 07a4109..785eb46 100644 --- a/templates/avahi.service.j2 +++ b/templates/avahi.service.j2 @@ -9,7 +9,7 @@ {%- endif -%} - _{{ item.service | lower }}._tcp + _{{ item.service | lower }}._{{ item.transport | default("tcp") | lower }} {{ item.port | int }} {% for record in item.txt_records | default([]) %} {{ record }} diff --git a/vars/main.yml b/vars/main.yml index d102bfb..fb20c72 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,4 +1,4 @@ --- # versionscheck -playbook_version_number: 6 +playbook_version_number: 7 playbook_version_path: 'do1jlr.avahi_daemon.version'