From 3b79c0177c65b7b8687ec93fa31e4ed9ce600e55 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Mon, 22 Feb 2021 18:28:55 +0100 Subject: [PATCH] [nginx] Don't deploy SSL configuration if we don't need one Signed-off-by: Yohann D'ANELLO --- group_vars/roundcube.yml | 20 ++++++++++++++++++++ host_vars/charybde.adm.crans.org.yml | 1 + host_vars/roundcube.adm.crans.org.yml | 22 ---------------------- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/group_vars/roundcube.yml b/group_vars/roundcube.yml index 903313f5..7e660170 100644 --- a/group_vars/roundcube.yml +++ b/group_vars/roundcube.yml @@ -30,3 +30,23 @@ glob_roundcube: larry: https://www.crans.org/images/crans_banner.png classic: https://www.crans.org/images/crans_banner.png +loc_nginx: + service_name: "roundcube" + ssl: [] + servers: + - server_name: "{{ query('ldap', 'ip', ansible_hostname, 'adm') | ipwrap + [ansible_hostname, ansible_hostname + '.adm.crans.org'] }}" + default: true + root: "/var/lib/roundcube" + locations: + - filter: "~ \\.php$" + params: + - "include snippets/fastcgi-php.conf" + - "fastcgi_buffer_size 128k" + - "fastcgi_buffers 4 256k" + - "fastcgi_busy_buffers_size 256k" + - "fastcgi_pass unix:/var/run/php/php7.3-fpm.sock" + - "include fastcgi_params" + additional_params: + - "index index.php index.htm index.html" + - "try_files $uri $uri/ /index.php?q=$uri&$args" + - "client_max_body_size 10G" diff --git a/host_vars/charybde.adm.crans.org.yml b/host_vars/charybde.adm.crans.org.yml index fd0885f9..00db4ce7 100644 --- a/host_vars/charybde.adm.crans.org.yml +++ b/host_vars/charybde.adm.crans.org.yml @@ -36,6 +36,7 @@ to_backup: loc_nginx: service_name: ftp + ssl: [] servers: - server_name: - "ftp" diff --git a/host_vars/roundcube.adm.crans.org.yml b/host_vars/roundcube.adm.crans.org.yml index 67d59ab3..2eb6f993 100644 --- a/host_vars/roundcube.adm.crans.org.yml +++ b/host_vars/roundcube.adm.crans.org.yml @@ -2,25 +2,3 @@ interfaces: adm: eth0 srv_nat: eth1 - -loc_nginx: - service_name: "roundcube" - ssl: [] - servers: - - server_name: - - "roundcube.adm.crans.org" - default: true - root: "/var/lib/roundcube" - locations: - - filter: "~ \\.php$" - params: - - "include snippets/fastcgi-php.conf" - - "fastcgi_buffer_size 128k" - - "fastcgi_buffers 4 256k" - - "fastcgi_busy_buffers_size 256k" - - "fastcgi_pass unix:/var/run/php/php7.3-fpm.sock" - - "include fastcgi_params" - additional_params: - - "index index.php index.htm index.html" - - "try_files $uri $uri/ /index.php?q=$uri&$args" - - "client_max_body_size 10G"