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

create transport option

This commit is contained in:
L3D 2021-09-02 02:10:18 +02:00
parent 2ccf720db2
commit 53da61f984
Signed by: l3d
GPG key ID: CD08445BFF4313D1
4 changed files with 5 additions and 2 deletions

View file

@ -14,6 +14,7 @@ Here is a list with available parameters:
- ``name``: optional name to announce the Service - ``name``: optional name to announce the Service
- ``protocol``: ``any``/``ipv6``/``ipv4`` - ``protocol``: ``any``/``ipv6``/``ipv4``
- ``txt_records``: an array of txt records - ``txt_records``: an array of txt records
- ``transport``: Transport Protokoll (``tcp``/``udp``)
Example: Example:
@ -23,6 +24,7 @@ avahi_services:
- service: 'SSH' - service: 'SSH'
port: 22 port: 22
protocol: 'any' protocol: 'any'
transport: 'tcp'
- service: 'NFS' - service: 'NFS'
name: 'Filesharing Host %h' name: 'Filesharing Host %h'
port: 2049 port: 2049

View file

@ -3,6 +3,7 @@ avahi_services:
- service: 'SSH' - service: 'SSH'
port: 22 port: 22
protocol: 'any' protocol: 'any'
transport: 'tcp'
# - service: 'NFS' # - service: 'NFS'
# name: 'Filesharing Host %h' # name: 'Filesharing Host %h'
# port: 2049 # port: 2049

View file

@ -9,7 +9,7 @@
{%- endif -%} {%- endif -%}
</name> </name>
<service protocol="{{ item.protocol | default("any") }}"> <service protocol="{{ item.protocol | default("any") }}">
<type>_{{ item.service | lower }}._tcp</type> <type>_{{ item.service | lower }}._{{ item.transport | default("tcp") | lower }}</type>
<port>{{ item.port | int }}</port> <port>{{ item.port | int }}</port>
{% for record in item.txt_records | default([]) %} {% for record in item.txt_records | default([]) %}
<txt-record>{{ record }}</txt-record> <txt-record>{{ record }}</txt-record>

View file

@ -1,4 +1,4 @@
--- ---
# versionscheck # versionscheck
playbook_version_number: 6 playbook_version_number: 7
playbook_version_path: 'do1jlr.avahi_daemon.version' playbook_version_path: 'do1jlr.avahi_daemon.version'