From 70a78d06d1664c94ad7eca2eadf6997f9fe27166 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Mon, 22 Feb 2021 14:43:36 +0100 Subject: [PATCH] [irc] Configure nginx for the lounge Signed-off-by: Yohann D'ANELLO --- host_vars/irc.adm.crans.org.yml | 16 ++++++++++++++++ plays/irc.yml | 9 +++++++++ 2 files changed, 25 insertions(+) create mode 100755 plays/irc.yml diff --git a/host_vars/irc.adm.crans.org.yml b/host_vars/irc.adm.crans.org.yml index 53d3a98a..39a43fd5 100644 --- a/host_vars/irc.adm.crans.org.yml +++ b/host_vars/irc.adm.crans.org.yml @@ -2,3 +2,19 @@ interfaces: adm: ens18 srv: ens19 + +loc_certbot: + domains: "irc.crans.org" + +loc_nginx: + service_name: "thelounge" + servers: + - server_name: + - "irc.crans.org" + - "irc" + ssl: true + locations: + - filter: "^~ /web/" + params: + - "proxy_pass http://localhost:9000/" + - "include \"/etc/nginx/snippets/options-proxypass.conf\"" diff --git a/plays/irc.yml b/plays/irc.yml new file mode 100755 index 00000000..bd4a5e99 --- /dev/null +++ b/plays/irc.yml @@ -0,0 +1,9 @@ +#!/usr/bin/env ansible-playbook +--- +- hosts: irc + vars: + certbot: '{{ glob_certbot | default({}) | combine(loc_certbot | default({})) }}' + nginx: '{{ glob_nginx | default({}) | combine(loc_nginx | default({})) }}' + roles: + - certbot + - nginx