In between commit Magento implementation

This commit is contained in:
2025-09-05 17:01:13 +02:00
parent 00c99e58e9
commit 2839d2e1a4
3 changed files with 97 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
---
- name: Assert required vars (no defaults anywhere)
assert:
that:
- MAGENTO_DOMAIN is defined and MAGENTO_DOMAIN | length > 0
- MAGENTO_NGINX_PORT is defined
- MAGENTO_PHP_HOST is defined and MAGENTO_PHP_HOST | length > 0
- MAGENTO_PHP_PORT is defined
- docker_compose.directories.config is defined and docker_compose.directories.config | length > 0
fail_msg: "Missing one of: MAGENTO_DOMAIN, MAGENTO_NGINX_PORT, MAGENTO_PHP_HOST, MAGENTO_PHP_PORT, docker_compose.directories.config"
- name: Ensure subdirs exist (config root exists already)
file:
path: "{{ item }}"
state: directory
mode: '0755'
loop:
- "{{ MAGENTO_NGINX_DIR }}"
- "{{ MAGENTO_PHP_DIR }}"
- name: Render nginx main config (no TLS; single source of truth)
template:
src: "nginx.conf.j2"
dest: "{{ MAGENTO_NGINX_CONF_PATH }}"
mode: '0644'
force: true
notify: docker compose up
- name: Render php-fpm pool override (TCP listen; clear_env=no)
template:
src: "php-fpm-zz-docker.conf.j2"
dest: "{{ MAGENTO_PHP_ZZ_CONF_PATH }}"
mode: '0644'
force: true
notify: docker compose up