✨: dynamic inventory with proxmox
Some checks failed
ansible-lint / lint-everything (push) Failing after 1m12s
Some checks failed
ansible-lint / lint-everything (push) Failing after 1m12s
This commit is contained in:
@@ -45,7 +45,7 @@ frontend http
|
||||
{% for hostname in hostvars[server]['web_hostname'] | sort(attribute='host') %}
|
||||
## {{ hostname.host }} configuration
|
||||
acl host_{{ hostname.host }} hdr(host) -i {{ hostname.host }}
|
||||
use_backend http_{{ server }} if letsencrypt host_{{ hostname.host }}
|
||||
use_backend http_{{ hostvars[server].ansible_host }} if letsencrypt host_{{ hostname.host }}
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
@@ -64,21 +64,21 @@ frontend https
|
||||
acl network_allowed_{{ hostname.host }} src {% for addrv4 in hostname.allowlistv4 %}{{ addrv4 }}{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
use_backend https_{{ server }} if host_{{ hostname.host }}{% if hostname.allowlistv4 is defined %} network_allowed_{{ hostname.host }}{% endif %}
|
||||
use_backend https_{{ hostvars[server].ansible_host }} if host_{{ hostname.host }}{% if hostname.allowlistv4 is defined %} network_allowed_{{ hostname.host }}{% endif %}
|
||||
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% for server in groups['webservers'] | difference(groups['disabled_loadbalanced_webservers']) | sort %}
|
||||
## {{ server }} configuration
|
||||
backend http_{{ server }}
|
||||
## {{ hostvars[server].ansible_host }} configuration
|
||||
backend http_{{ hostvars[server].ansible_host }}
|
||||
mode http
|
||||
server host_{{ server.split('.')|join('_') }} {{ hostvars[server]['ansible_default_ipv4']['address'] }}:80
|
||||
server host_{{ hostvars[server].ansible_host.split('.')|join('_') }} {{ hostvars[server]['ansible_default_ipv4']['address'] }}:80
|
||||
|
||||
backend https_{{ server }}
|
||||
backend https_{{ hostvars[server].ansible_host }}
|
||||
mode tcp
|
||||
server host_{{ server.split('.')|join('_') }} {{ hostvars[server]['ansible_default_ipv4']['address'] }}:443
|
||||
server host_{{ hostvars[server].ansible_host.split('.')|join('_') }} {{ hostvars[server]['ansible_default_ipv4']['address'] }}:443
|
||||
|
||||
{% endfor %}
|
||||
|
||||
|
Reference in New Issue
Block a user