From 63e5f1e570deda61b6d30215936ab66ae5ac8b08 Mon Sep 17 00:00:00 2001 From: nd Date: Mon, 19 Feb 2024 18:12:07 +0100 Subject: [PATCH 1/4] add bz2 php module --- tasks/php-fpm.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tasks/php-fpm.yml b/tasks/php-fpm.yml index 9e06655..c68782b 100644 --- a/tasks/php-fpm.yml +++ b/tasks/php-fpm.yml @@ -21,13 +21,14 @@ - php-gmp - php-zip - php-curl + - php-bz2 + - php-apcu + - php-bcmath + - php-pear # database pdos - php-pdo-sqlite - php-pdo-pgsql - php-pdo-mysql - - php-apcu - - php-bcmath - - php-pear notify: - restart nginx - restart php-fpm From 4b1ac020d6c3c9ca28d94ec3ec57d56c447e337b Mon Sep 17 00:00:00 2001 From: nd Date: Mon, 19 Feb 2024 19:09:09 +0100 Subject: [PATCH 2/4] add redis support to php --- tasks/php-fpm.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/php-fpm.yml b/tasks/php-fpm.yml index c68782b..b8b2d83 100644 --- a/tasks/php-fpm.yml +++ b/tasks/php-fpm.yml @@ -25,6 +25,7 @@ - php-apcu - php-bcmath - php-pear + - php-redis # database pdos - php-pdo-sqlite - php-pdo-pgsql From ca850c76021144de6bf0505c60a4156912140b0f Mon Sep 17 00:00:00 2001 From: nd Date: Mon, 19 Feb 2024 19:09:19 +0100 Subject: [PATCH 3/4] add mjs to mime table --- files/config/mime.types | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/config/mime.types b/files/config/mime.types index 89be9a4..176b6c5 100644 --- a/files/config/mime.types +++ b/files/config/mime.types @@ -5,7 +5,7 @@ types { text/xml xml; image/gif gif; image/jpeg jpeg jpg; - application/javascript js; + application/javascript js mjs; application/atom+xml atom; application/rss+xml rss; From 1bc80fa9ea87975b3dc1935da4dc1e17fe0cfacf Mon Sep 17 00:00:00 2001 From: nd Date: Fri, 8 Mar 2024 13:50:45 +0100 Subject: [PATCH 4/4] Move certificate generation to after the nginx package is installed This prevents a problem where the certificate role tries to restart a not yet installed nginx --- tasks/main.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 043be4c..0c06b23 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -5,18 +5,6 @@ inventory_certs: "{{ certificates.certs|d({}) | dict2items | selectattr ('key', 'regex', '^nginx_') | items2dict }}" selfsigned_cert: "{ '{{ inventory_hostname }}': { 'backend': 'selfsigned' }}" -- name: generate certificates for vhosts - include_role: - name: certificates - vars: - certificates: - certs: "{{ {}|combine( (selfsigned_cert|from_yaml if nginx.snakeoil_default else {}), nginx_certs, inventory_certs, recursive=True) }}" - -- name: debug nginx dict - debug: - verbosity: 1 - var: nginx - - name: install nginx apt: pkg: @@ -31,6 +19,18 @@ - delete nginx index.nginx-debian.html - restart nginx +- name: generate certificates for vhosts + include_role: + name: certificates + vars: + certificates: + certs: "{{ {}|combine( (selfsigned_cert|from_yaml if nginx.snakeoil_default else {}), nginx_certs, inventory_certs, recursive=True) }}" + +- name: debug nginx dict + debug: + verbosity: 1 + var: nginx + - name: copy configs copy: src: config/