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; }