[zamok_apache] Pepcransification

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
certbot_on_virtu
Yohann D'ANELLO 2021-02-22 14:07:35 +01:00
parent 6774cca43c
commit 408c857f81
Signed by: _ynerant
GPG Key ID: 3A75C55819C8CF85
4 changed files with 26 additions and 11 deletions

View File

@ -0,0 +1,12 @@
---
glob_adh:
apache:
listen_local:
- "127.0.0.1:80"
- "[::1]:80"
listen_network: "{{ query('ldap', 'ip', ansible_hostname, 'adm') | ipwrap }}"
club_vhosts:
- from: pot-vieux.crans.org
to: club-vieux/www
- from: med.crans.org
to: club-med/www

View File

@ -2,6 +2,8 @@
---
- hosts: adh_server
vars:
adh: '{{ glob_adh | combine(loc_adh | default({}), recursive=True) }}'
roles:
- zamok-tools
- postfix

View File

@ -1,4 +1,5 @@
pot-vieux.crans.org club-vieux/www
med.crans.org club-med/www
www.scepinvaders.com waltsburger/www
scepinvaders.com waltsburger/www
{{ ansible_header | comment }}
{% for host in adh.apache.club_vhosts -%}
{{ host.from }} {{ host.to }}
{% endfor -%}

View File

@ -1,9 +1,9 @@
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
{{ ansible_header | comment }}
Listen 127.0.0.1:80
Listen 172.16.10.31:80
Listen [::1]:80
Listen [fd00::10:1e98:ecff:fe15:2c8a]:80
{% for host in adh.apache.listen_local -%}
Listen {{ host }}
{% endfor -%}
{% for host in adh.apache.listen_network -%}
Listen {{ host }}:80
{% endfor -%}
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet