From ef432642dd2101a8ff22c813ee9a9bd85d597ca2 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Wed, 20 Dec 2023 22:35:11 +0000 Subject: [PATCH] Unify nginx module tasks --- ansible/roles/nginx/tasks/main.yml | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/ansible/roles/nginx/tasks/main.yml b/ansible/roles/nginx/tasks/main.yml index a8f379e..f4e2a49 100644 --- a/ansible/roles/nginx/tasks/main.yml +++ b/ansible/roles/nginx/tasks/main.yml @@ -10,27 +10,21 @@ when: ansible_os_family == 'Archlinux' become: true -- name: Install nginx-mod-http-headers-more +- name: Install nginx modules package: - name: libnginx-mod-http-headers-more-filter + name: "{{ item }}" + loop: + - libnginx-mod-http-headers-more-filter + - libnginx-mod-http-brotli-filter when: ansible_os_family != 'Archlinux' become: true -- name: Install nginx-mod-http-headers-more on Arch +- name: Install nginx modules (on Arch) kewlfft.aur.aur: - name: nginx-mainline-mod-headers-more - when: ansible_os_family == 'Archlinux' - become: true - -- name: Install nginx-mod-brotli - package: - name: libnginx-mod-http-brotli-filter - when: ansible_os_family != 'Archlinux' - become: true - -- name: Install nginx-mod-brotli on Arch - kewlfft.aur.aur: - name: nginx-mainline-mod-brotli + name: "{{ item }}" + loop: + - nginx-mainline-mod-headers-more + - nginx-mainline-mod-brotli when: ansible_os_family == 'Archlinux' become: true