initial commit

This commit is contained in:
Johann 2025-08-21 15:31:19 +02:00
commit 8e27e10f26
12 changed files with 202 additions and 0 deletions

32
roles/php/tasks/main.yml Normal file
View file

@ -0,0 +1,32 @@
---
- name: Install PHP extensions
ansible.builtin.apt:
name:
- "php{{ php_version }}-fpm"
# Required
- "php{{ php_version }}-common"
- php-json
- "php{{ php_version }}-xml"
- "php{{ php_version }}-curl"
- "php{{ php_version }}-gd"
- "php{{ php_version }}-intl"
- "php{{ php_version }}-mysql"
# Optional
- "php{{ php_version }}-bz2"
- "php{{ php_version }}-zip"
- "php{{ php_version }}-ldap"
- "php{{ php_version }}-mbstring"
- name: Configure session.cookie_secure on php.ini to on
ansible.builtin.replace:
path: "/etc/php/{{ php_version }}/fpm/php.ini"
regexp: "^(;)?({{ item }} =)( (on|off))?$"
replace: "{{ item }} = on"
loop:
- session.cookie_secure
- session.cookie_httponly
notify:
- Restart PHP-FPM
...