From 81e3b72360b4943f097150bbd0aad305cead5c34 Mon Sep 17 00:00:00 2001 From: Jeff Bradberry Date: Mon, 22 Jan 2024 16:23:29 -0500 Subject: [PATCH] Support old-style host plus port as well as new-style address strings --- roles/setup/templates/receptor.conf.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/setup/templates/receptor.conf.j2 b/roles/setup/templates/receptor.conf.j2 index 6a0a861..8b25262 100644 --- a/roles/setup/templates/receptor.conf.j2 +++ b/roles/setup/templates/receptor.conf.j2 @@ -54,7 +54,11 @@ {% if receptor_peers | default([]) %} {% for peer in receptor_peers %} - {{ peer['protocol'] }}-peer: + {% if 'port' in peer -%} address: {{ peer['address'] | default(peer['host']) }}:{{ peer['port'] }} + {% else %} + address: {{ peer['address'] }} + {%- endif %} redial: true {% if receptor_tls %} tls: tls_client