Browse Source

get reverse proxy ip from hostname with filter

python3
Edoardo Putti 8 years ago
parent
commit
109362d663
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      roles/reverse_proxy/templates/http.j2

+ 1
- 1
roles/reverse_proxy/templates/http.j2 View File

@ -8,7 +8,7 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://{{ hostvars[ansible_hostname]['ansible_host'] }};
proxy_pass http://{{ hostvars | ip_from_inventory(ansible_hostname) }};
}
location / {


Loading…
Cancel
Save