Skip to content

Commit 1d6d28e

Browse files
Michael Vasseurvmcj
authored andcommitted
Remove duplication of packages
We only deploy on debian/ubuntu where all php modules are prefixed with `php-`
1 parent 6690707 commit 1d6d28e

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
DOMSERVER_PACKAGES:
2+
- nginx
3+
- php-fpm
4+
- php-intl

provision-contest/ansible/roles/domserver/tasks/main.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@
3434
- name: Install required packages
3535
apt:
3636
state: present
37-
pkg:
38-
- nginx
39-
- php-fpm
40-
- php-intl
37+
pkg: "{{ DOMSERVER_PACKAGES }}"
4138

4239
- name: Set PHP timezone for FPM
4340
lineinfile:
@@ -51,9 +48,7 @@
5148
command: phpenmod {{ item }}
5249
args:
5350
creates: "/etc/php/{{ php_version.stdout }}/fpm/conf.d/20-{{ item }}.ini"
54-
loop:
55-
- zip
56-
- intl
51+
loop: "{{ DOMSERVER_PACKAGES | map('regex_search', 'php-') | select() }}"
5752
notify: Restart PHP FPM
5853

5954
- name: Add domjudge nginx conf

0 commit comments

Comments
 (0)