initial commit
This commit is contained in:
commit
8e27e10f26
12 changed files with 202 additions and 0 deletions
6
roles/php/handlers/main.yml
Normal file
6
roles/php/handlers/main.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
- name: Restart PHP-FPM
|
||||
ansible.builtin.service:
|
||||
name: "php{{ php_version }}-fpm.service"
|
||||
state: restarted
|
||||
...
|
||||
32
roles/php/tasks/main.yml
Normal file
32
roles/php/tasks/main.yml
Normal 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
|
||||
...
|
||||
3
roles/php/vars/main.yml
Normal file
3
roles/php/vars/main.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
php_version: '8.2'
|
||||
...
|
||||
Loading…
Add table
Add a link
Reference in a new issue