Last active
August 26, 2018 18:14
-
-
Save Zodzie/c43fbf4e261b18b2c3bdf1cc7bf49e41 to your computer and use it in GitHub Desktop.
template_actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for host in groups['users'] %} | |
acl {{ hostvars[host].username }} path_reg -i ^\/{{ hostvars[host].username }}[^\.]* | |
use_backend {{ hostvars[host].username }}_back if {{ hostvars[host].username }} | |
{% endfor %} | |
{% if hostvars[host].subscription == 'pro' %} | |
acl {{ hostvars[host].username }} hdr(host) -i {{ hostvars[host].username }}.com | |
use_backend {{ hostvars[host].username}}_back if {{ hostvars[host].username }} | |
{% endif %} | |
{% for host in groups['users'] %} | |
backend {{ hostvars[host].username }}_back | |
redirect scheme https if !{ ssl_fc } | |
server somewhere server.ip.add.ress:{{ hostvars[host].user_port }} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment