fix: create PHP-FPM log directory before service starts

- Add preflight task to create /var/log/php{X}-fpm directory
- Add default php_version var for early template access
This commit is contained in:
Sebastian Palencsar
2026-05-06 13:47:18 +02:00
parent 168c59f3ea
commit 2aa5480d17
2 changed files with 20 additions and 0 deletions

View File

@@ -66,6 +66,9 @@
tags: always
vars:
# Default PHP version (will be overridden by detection)
php_version: "8.4"
# WordPress Configuration
wordpress_path: "{{ web_root }}"
wordpress_url: "http://{{ ansible_default_ipv4.address | default('localhost') }}"
@@ -98,6 +101,13 @@
mode: '0755'
tags: [preflight]
- name: Create PHP-FPM log directory
file:
path: "/var/log/php{{ php_version }}-fpm"
state: directory
mode: '0755'
tags: [preflight]
# Package Installation
- name: Update package cache
apt:

View File

@@ -66,6 +66,9 @@
tags: always
vars:
# Default PHP version (will be overridden by detection)
php_version: "8.4"
# WordPress Configuration
wordpress_path: "{{ web_root }}"
wordpress_url: "http://{{ ansible_default_ipv4.address | default('localhost') }}"
@@ -101,6 +104,13 @@
mode: '0755'
tags: [preflight]
- name: Create PHP-FPM log directory
file:
path: "/var/log/php{{ php_version }}-fpm"
state: directory
mode: '0755'
tags: [preflight]
# Package Installation
- name: Update package cache
apt: