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