From 7c32a6a7be34d3ae22ffd4f3d8ebac8fa0b2d1ec Mon Sep 17 00:00:00 2001 From: Edoardo Putti Date: Mon, 6 Aug 2018 12:41:39 +0200 Subject: [PATCH] use filter when finding reverse proxy destionation --- roles/reverse_proxy/templates/upstream.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/reverse_proxy/templates/upstream.j2 b/roles/reverse_proxy/templates/upstream.j2 index 7451080..d48ea6f 100644 --- a/roles/reverse_proxy/templates/upstream.j2 +++ b/roles/reverse_proxy/templates/upstream.j2 @@ -1,3 +1,3 @@ upstream {{ hostname }}_https { - server {{ hostvars[ansible_hostname]['ansible_host'] }}:443; + server {{ hostvars | ip_from_inventory(ansible_hostname) }}:443; }