mirror of
https://github.com/MichaelCade/90DaysOfDevOps.git
synced 2025-01-24 18:15:28 +07:00
14 lines
338 B
Plaintext
14 lines
338 B
Plaintext
|
#Dynamic Config for server {{ ansible_facts['nodename'] }}
|
||
|
upstream webservers {
|
||
|
{% for host in groups['webservers'] %}
|
||
|
server {{ hostvars[host]['ansible_facts']['nodename'] }}:8000;
|
||
|
{% endfor %}
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
listen 80;
|
||
|
|
||
|
location / {
|
||
|
proxy_pass http://webservers;
|
||
|
}
|
||
|
}
|