Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da2f0876dd | ||
|
|
cfb63da386 | ||
|
|
55193c7bd4 | ||
|
|
2aa5480d17 | ||
|
|
168c59f3ea | ||
|
|
58ffb82378 | ||
|
|
38241f82e3 | ||
|
|
9eac2c2057 | ||
|
|
feb6a2c962 | ||
|
|
619205e0a8 | ||
|
|
1361466dfe | ||
|
|
1fa863f107 | ||
|
|
605b4e8c7b |
9
.github/workflows/ci-cd.yml
vendored
9
.github/workflows/ci-cd.yml
vendored
@@ -42,8 +42,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Validate Ansible syntax
|
- name: Validate Ansible syntax
|
||||||
run: |
|
run: |
|
||||||
|
mkdir -p test-inventory
|
||||||
|
cat > test-inventory/hosts <<EOF
|
||||||
|
[all]
|
||||||
|
localhost ansible_connection=local
|
||||||
|
EOF
|
||||||
for playbook in playbooks/*.yml; do
|
for playbook in playbooks/*.yml; do
|
||||||
ansible-playbook --syntax-check "$playbook"
|
ansible-playbook -i test-inventory/hosts --syntax-check "$playbook"
|
||||||
done
|
done
|
||||||
|
|
||||||
test-ubuntu:
|
test-ubuntu:
|
||||||
@@ -89,7 +94,7 @@ jobs:
|
|||||||
echo "Testing syntax for all playbooks..."
|
echo "Testing syntax for all playbooks..."
|
||||||
for playbook in playbooks/*.yml; do
|
for playbook in playbooks/*.yml; do
|
||||||
echo "Checking $playbook..."
|
echo "Checking $playbook..."
|
||||||
ansible-playbook "$playbook" --syntax-check
|
ansible-playbook -i test-inventory/hosts "$playbook" --syntax-check
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Test variable loading
|
- name: Test variable loading
|
||||||
|
|||||||
@@ -14,12 +14,15 @@ RUN mkdir -p /var/run/sshd /var/log/supervisor \
|
|||||||
&& echo 'ansible ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
&& echo 'ansible ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||||
|
|
||||||
# Install base system packages in a single layer
|
# Install base system packages in a single layer
|
||||||
|
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
|
||||||
|
# Core system
|
||||||
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
|
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
|
||||||
# Core system
|
# Core system
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
gnupg \
|
gnupg \
|
||||||
lsb-release \
|
lsb-release \
|
||||||
apt-transport-https \
|
apt-transport-https \
|
||||||
|
software-properties-common \
|
||||||
# SSH and system control
|
# SSH and system control
|
||||||
openssh-server \
|
openssh-server \
|
||||||
sudo \
|
sudo \
|
||||||
@@ -50,8 +53,8 @@ RUN apt-get update && apt-get install -y \
|
|||||||
# Web server
|
# Web server
|
||||||
nginx \
|
nginx \
|
||||||
# Database
|
# Database
|
||||||
mysql-server \
|
mariadb-server \
|
||||||
mysql-client \
|
mariadb-client \
|
||||||
# PHP and extensions
|
# PHP and extensions
|
||||||
php8.4 \
|
php8.4 \
|
||||||
php8.4-fpm \
|
php8.4-fpm \
|
||||||
@@ -84,7 +87,7 @@ RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/
|
|||||||
# Configure systemd
|
# Configure systemd
|
||||||
RUN systemctl enable ssh \
|
RUN systemctl enable ssh \
|
||||||
&& systemctl enable nginx \
|
&& systemctl enable nginx \
|
||||||
&& systemctl enable mysql \
|
&& systemctl enable mysql mariadb \
|
||||||
&& systemctl enable php8.4-fpm
|
&& systemctl enable php8.4-fpm
|
||||||
|
|
||||||
# Create web directory structure
|
# Create web directory structure
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Services für LEMP-Stack starten
|
# Services für LEMP-Stack starten
|
||||||
|
|
||||||
# MySQL starten
|
# MySQL/MariaDB starten
|
||||||
service mysql start
|
service mysql start || service mariadb start
|
||||||
|
|
||||||
# PHP-FPM starten
|
# PHP-FPM starten
|
||||||
service php8.4-fpm start
|
service php8.4-fpm start
|
||||||
|
|||||||
@@ -20,15 +20,15 @@
|
|||||||
- name: Debug OS information
|
- name: Debug OS information
|
||||||
debug:
|
debug:
|
||||||
msg: |
|
msg: |
|
||||||
OS Family: {{ ansible_os_family }}
|
OS Family: {{ ansible_facts["os_family"] }}
|
||||||
Distribution: {{ ansible_distribution }}
|
Distribution: {{ ansible_facts["distribution"] }}
|
||||||
Version: {{ ansible_distribution_version }}
|
Version: {{ ansible_facts["distribution_version"] }}
|
||||||
Supported: Ubuntu/Debian family systems
|
Supported: Ubuntu/Debian family systems
|
||||||
|
|
||||||
- name: Verify supported OS
|
- name: Verify supported OS
|
||||||
fail:
|
fail:
|
||||||
msg: "This playbook only supports Ubuntu/Debian systems. Detected: {{ ansible_os_family }}"
|
msg: "This playbook only supports Ubuntu/Debian systems. Detected {{ ansible_facts['os_family'] }}"
|
||||||
when: ansible_os_family != "Debian"
|
when: ansible_facts["os_family"] != "Debian"
|
||||||
|
|
||||||
# Environment Detection and Configuration
|
# Environment Detection and Configuration
|
||||||
- name: Detect if running in Docker
|
- name: Detect if running in Docker
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
vars:
|
vars:
|
||||||
_auto_wp_url: >-
|
_auto_wp_url: >-
|
||||||
{{ 'http://localhost:8080' if (deployment_environment == 'docker')
|
{{ 'http://localhost:8080' if (deployment_environment == 'docker')
|
||||||
else 'http://' + (ansible_default_ipv4.address | default('localhost')) }}
|
else 'http://' + (ansible_facts["default_ipv4"]["address"] | default('localhost')) }}
|
||||||
tags: always
|
tags: always
|
||||||
|
|
||||||
- name: Debug deployment configuration
|
- name: Debug deployment configuration
|
||||||
@@ -66,9 +66,12 @@
|
|||||||
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_facts['default_ipv4']['address'] | default('localhost') }}"
|
||||||
|
|
||||||
# Database Configuration (use inventory variables or these defaults)
|
# Database Configuration (use inventory variables or these defaults)
|
||||||
default_mysql_root_password: "{{ mysql_root_password | default('secure_root_password_123') }}"
|
default_mysql_root_password: "{{ mysql_root_password | default('secure_root_password_123') }}"
|
||||||
@@ -81,6 +84,30 @@
|
|||||||
# wp_admin_user, wp_admin_password, wp_admin_email, wp_site_title
|
# wp_admin_user, wp_admin_password, wp_admin_email, wp_site_title
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
# IMPORTANT: Pre-flight checks - create basic directory structure FIRST
|
||||||
|
- name: Ensure /var/www exists
|
||||||
|
file:
|
||||||
|
path: /var/www
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
tags: [preflight]
|
||||||
|
|
||||||
|
- name: Create web root directory
|
||||||
|
file:
|
||||||
|
path: /var/www/html
|
||||||
|
state: directory
|
||||||
|
owner: www-data
|
||||||
|
group: www-data
|
||||||
|
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
|
# Package Installation
|
||||||
- name: Update package cache
|
- name: Update package cache
|
||||||
apt:
|
apt:
|
||||||
@@ -88,10 +115,65 @@
|
|||||||
cache_valid_time: 3600
|
cache_valid_time: 3600
|
||||||
tags: packages
|
tags: packages
|
||||||
|
|
||||||
- name: Install all required packages
|
- name: Install essential packages
|
||||||
package:
|
apt:
|
||||||
name: "{{ packages }}"
|
name:
|
||||||
|
- gnupg
|
||||||
|
- nginx
|
||||||
state: present
|
state: present
|
||||||
|
tags: [packages, nginx]
|
||||||
|
|
||||||
|
- name: Detect available PHP version and set fallback
|
||||||
|
shell: |
|
||||||
|
if apt-cache show php8.4-fpm >/dev/null 2>&1; then
|
||||||
|
echo "8.4"
|
||||||
|
elif apt-cache show php8.3-fpm >/dev/null 2>&1; then
|
||||||
|
echo "8.3"
|
||||||
|
else
|
||||||
|
echo "none"
|
||||||
|
fi
|
||||||
|
register: php_version_detect
|
||||||
|
changed_when: false
|
||||||
|
tags: packages
|
||||||
|
|
||||||
|
- name: Set PHP version fact
|
||||||
|
set_fact:
|
||||||
|
php_version: "{{ php_version_detect.stdout }}"
|
||||||
|
tags: packages
|
||||||
|
|
||||||
|
- name: Install PHP with fallback (try 8.4, fallback to 8.3)
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- "php{{ php_version }}-fpm"
|
||||||
|
- "php{{ php_version }}-mysql"
|
||||||
|
- "php{{ php_version }}-curl"
|
||||||
|
- "php{{ php_version }}-gd"
|
||||||
|
- "php{{ php_version }}-intl"
|
||||||
|
- "php{{ php_version }}-mbstring"
|
||||||
|
- "php{{ php_version }}-soap"
|
||||||
|
- "php{{ php_version }}-xml"
|
||||||
|
- "php{{ php_version }}-xmlrpc"
|
||||||
|
- "php{{ php_version }}-zip"
|
||||||
|
- "php{{ php_version }}-opcache"
|
||||||
|
- "php{{ php_version }}-redis"
|
||||||
|
state: present
|
||||||
|
register: php_install_result
|
||||||
|
tags: packages
|
||||||
|
|
||||||
|
- name: Install remaining packages
|
||||||
|
package:
|
||||||
|
name: "{{ packages | reject('search', '^php') | list }}"
|
||||||
|
state: present
|
||||||
|
tags: packages
|
||||||
|
|
||||||
|
- name: Display PHP version installed
|
||||||
|
debug:
|
||||||
|
msg: "Using PHP version {{ php_version }}"
|
||||||
|
tags: packages
|
||||||
|
|
||||||
|
- name: Set PHP FPM service name dynamically
|
||||||
|
set_fact:
|
||||||
|
php_fpm_service: "php{{ php_version }}-fpm"
|
||||||
tags: packages
|
tags: packages
|
||||||
|
|
||||||
# Service Management
|
# Service Management
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
# Ubuntu/Debian LEMP WordPress installation
|
# Ubuntu/Debian LEMP WordPress installation
|
||||||
- name: Install LEMP stack with WordPress (Ubuntu/Debian)
|
- name: "Install LEMP stack with WordPress (Ubuntu/Debian)"
|
||||||
hosts: all
|
hosts: all
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
@@ -20,15 +20,15 @@
|
|||||||
- name: Debug OS information
|
- name: Debug OS information
|
||||||
debug:
|
debug:
|
||||||
msg: |
|
msg: |
|
||||||
OS Family: {{ ansible_os_family }}
|
OS Family: {{ ansible_facts["os_family"] }}
|
||||||
Distribution: {{ ansible_distribution }}
|
Distribution: {{ ansible_facts["distribution"] }}
|
||||||
Version: {{ ansible_distribution_version }}
|
Version: {{ ansible_facts["distribution_version"] }}
|
||||||
Supported: Ubuntu/Debian family systems
|
Supported: Ubuntu/Debian family systems
|
||||||
|
|
||||||
- name: Verify supported OS
|
- name: Verify supported OS
|
||||||
fail:
|
fail:
|
||||||
msg: "This playbook only supports Ubuntu/Debian systems. Detected: {{ ansible_os_family }}"
|
msg: "This playbook only supports Ubuntu/Debian systems. Detected {{ ansible_facts['os_family'] }}"
|
||||||
when: ansible_os_family != "Debian"
|
when: ansible_facts["os_family"] != "Debian"
|
||||||
|
|
||||||
# Environment Detection and Configuration
|
# Environment Detection and Configuration
|
||||||
- name: Detect if running in Docker
|
- name: Detect if running in Docker
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
vars:
|
vars:
|
||||||
_auto_wp_url: >-
|
_auto_wp_url: >-
|
||||||
{{ 'http://localhost:8080' if (deployment_environment == 'docker')
|
{{ 'http://localhost:8080' if (deployment_environment == 'docker')
|
||||||
else 'http://' + (ansible_default_ipv4.address | default('localhost')) }}
|
else 'http://' + (ansible_facts["default_ipv4"]["address"] | default('localhost')) }}
|
||||||
tags: always
|
tags: always
|
||||||
|
|
||||||
- name: Debug deployment configuration
|
- name: Debug deployment configuration
|
||||||
@@ -66,9 +66,12 @@
|
|||||||
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_facts['default_ipv4']['address'] | default('localhost') }}"
|
||||||
|
|
||||||
# Database Configuration (use inventory variables or these defaults)
|
# Database Configuration (use inventory variables or these defaults)
|
||||||
default_mysql_root_password: "{{ mysql_root_password | default('secure_root_password_123') }}"
|
default_mysql_root_password: "{{ mysql_root_password | default('secure_root_password_123') }}"
|
||||||
@@ -84,6 +87,30 @@
|
|||||||
update_cron_enabled: true
|
update_cron_enabled: true
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
# IMPORTANT: Pre-flight checks - create basic directory structure FIRST
|
||||||
|
- name: Ensure /var/www exists
|
||||||
|
file:
|
||||||
|
path: /var/www
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
tags: [preflight]
|
||||||
|
|
||||||
|
- name: Create web root directory
|
||||||
|
file:
|
||||||
|
path: /var/www/html
|
||||||
|
state: directory
|
||||||
|
owner: www-data
|
||||||
|
group: www-data
|
||||||
|
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
|
# Package Installation
|
||||||
- name: Update package cache
|
- name: Update package cache
|
||||||
apt:
|
apt:
|
||||||
@@ -91,10 +118,63 @@
|
|||||||
cache_valid_time: 3600
|
cache_valid_time: 3600
|
||||||
tags: packages
|
tags: packages
|
||||||
|
|
||||||
- name: Install all required packages
|
- name: Install essential packages
|
||||||
package:
|
apt:
|
||||||
name: "{{ packages }}"
|
name:
|
||||||
|
- gnupg
|
||||||
|
- nginx
|
||||||
state: present
|
state: present
|
||||||
|
tags: [packages, nginx]
|
||||||
|
|
||||||
|
- name: Detect available PHP version and set fallback
|
||||||
|
shell: |
|
||||||
|
if apt-cache show php8.4-fpm >/dev/null 2>&1; then
|
||||||
|
echo "8.4"
|
||||||
|
elif apt-cache show php8.3-fpm >/dev/null 2>&1; then
|
||||||
|
echo "8.3"
|
||||||
|
else
|
||||||
|
echo "none"
|
||||||
|
fi
|
||||||
|
register: php_version_detect
|
||||||
|
changed_when: false
|
||||||
|
tags: packages
|
||||||
|
|
||||||
|
- name: Set PHP version fact
|
||||||
|
set_fact:
|
||||||
|
php_version: "{{ php_version_detect.stdout }}"
|
||||||
|
tags: packages
|
||||||
|
|
||||||
|
- name: Install PHP with fallback (try 8.4, fallback to 8.3)
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- "php{{ php_version }}-fpm"
|
||||||
|
- "php{{ php_version }}-mysql"
|
||||||
|
- "php{{ php_version }}-curl"
|
||||||
|
- "php{{ php_version }}-gd"
|
||||||
|
- "php{{ php_version }}-intl"
|
||||||
|
- "php{{ php_version }}-mbstring"
|
||||||
|
- "php{{ php_version }}-soap"
|
||||||
|
- "php{{ php_version }}-xml"
|
||||||
|
- "php{{ php_version }}-xmlrpc"
|
||||||
|
- "php{{ php_version }}-zip"
|
||||||
|
state: present
|
||||||
|
register: php_install_result
|
||||||
|
tags: packages
|
||||||
|
|
||||||
|
- name: Install remaining packages
|
||||||
|
package:
|
||||||
|
name: "{{ packages | reject('search', '^php') | list }}"
|
||||||
|
state: present
|
||||||
|
tags: packages
|
||||||
|
|
||||||
|
- name: Display PHP version installed
|
||||||
|
debug:
|
||||||
|
msg: "Using PHP version {{ php_version }}"
|
||||||
|
tags: packages
|
||||||
|
|
||||||
|
- name: Set PHP FPM service name dynamically
|
||||||
|
set_fact:
|
||||||
|
php_fpm_service: "php{{ php_version }}-fpm"
|
||||||
tags: packages
|
tags: packages
|
||||||
|
|
||||||
# Service Management
|
# Service Management
|
||||||
@@ -363,10 +443,8 @@
|
|||||||
- name: Configure WordPress auto-update settings
|
- name: Configure WordPress auto-update settings
|
||||||
command: >
|
command: >
|
||||||
wp option update auto_update_core_minor enabled
|
wp option update auto_update_core_minor enabled
|
||||||
|
--path="{{ wordpress_path }}"
|
||||||
--allow-root
|
--allow-root
|
||||||
environment:
|
|
||||||
HOME: "{{ wordpress_path }}"
|
|
||||||
ignore_errors: yes
|
|
||||||
tags: update
|
tags: update
|
||||||
|
|
||||||
- name: Set up cron job for WordPress updates
|
- name: Set up cron job for WordPress updates
|
||||||
|
|||||||
@@ -49,14 +49,14 @@ define( 'WP_CACHE_KEY_SALT', '{{ domain_name | default('localhost') }}' );
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
// ** Authentifizierungs-Schlüssel und Salts ** //
|
// ** Authentifizierungs-Schlüssel und Salts ** //
|
||||||
define( 'AUTH_KEY', '{{ ansible_date_time.epoch }}put your unique phrase here{{ ansible_hostname }}' );
|
define( 'AUTH_KEY', '{{ ansible_facts["date_time"]["epoch"] }}put your unique phrase here{{ ansible_facts["hostname"] }}' );
|
||||||
define( 'SECURE_AUTH_KEY', '{{ ansible_date_time.epoch }}put your unique phrase here{{ ansible_hostname }}2' );
|
define( 'SECURE_AUTH_KEY', '{{ ansible_facts["date_time"]["epoch"] }}put your unique phrase here{{ ansible_facts["hostname"] }}2' );
|
||||||
define( 'LOGGED_IN_KEY', '{{ ansible_date_time.epoch }}put your unique phrase here{{ ansible_hostname }}3' );
|
define( 'LOGGED_IN_KEY', '{{ ansible_facts["date_time"]["epoch"] }}put your unique phrase here{{ ansible_facts["hostname"] }}3' );
|
||||||
define( 'NONCE_KEY', '{{ ansible_date_time.epoch }}put your unique phrase here{{ ansible_hostname }}4' );
|
define( 'NONCE_KEY', '{{ ansible_facts["date_time"]["epoch"] }}put your unique phrase here{{ ansible_facts["hostname"] }}4' );
|
||||||
define( 'AUTH_SALT', '{{ ansible_date_time.epoch }}put your unique phrase here{{ ansible_hostname }}5' );
|
define( 'AUTH_SALT', '{{ ansible_facts["date_time"]["epoch"] }}put your unique phrase here{{ ansible_facts["hostname"] }}5' );
|
||||||
define( 'SECURE_AUTH_SALT', '{{ ansible_date_time.epoch }}put your unique phrase here{{ ansible_hostname }}6' );
|
define( 'SECURE_AUTH_SALT', '{{ ansible_facts["date_time"]["epoch"] }}put your unique phrase here{{ ansible_facts["hostname"] }}6' );
|
||||||
define( 'LOGGED_IN_SALT', '{{ ansible_date_time.epoch }}put your unique phrase here{{ ansible_hostname }}7' );
|
define( 'LOGGED_IN_SALT', '{{ ansible_facts["date_time"]["epoch"] }}put your unique phrase here{{ ansible_facts["hostname"] }}7' );
|
||||||
define( 'NONCE_SALT', '{{ ansible_date_time.epoch }}put your unique phrase here{{ ansible_hostname }}8' );
|
define( 'NONCE_SALT', '{{ ansible_facts["date_time"]["epoch"] }}put your unique phrase here{{ ansible_facts["hostname"] }}8' );
|
||||||
|
|
||||||
// ** WordPress Tabellen-Präfix ** //
|
// ** WordPress Tabellen-Präfix ** //
|
||||||
$table_prefix = 'wp_';
|
$table_prefix = 'wp_';
|
||||||
@@ -71,8 +71,8 @@ define( 'WP_DEBUG_DISPLAY', false );
|
|||||||
define( 'WP_HOME', 'https://{{ domain_name }}' );
|
define( 'WP_HOME', 'https://{{ domain_name }}' );
|
||||||
define( 'WP_SITEURL', 'https://{{ domain_name }}' );
|
define( 'WP_SITEURL', 'https://{{ domain_name }}' );
|
||||||
{% else %}
|
{% else %}
|
||||||
define( 'WP_HOME', 'http://{{ domain_name }}{% if ansible_port is defined and ansible_port != 22 and ansible_port != 80 %}:{{ ansible_port }}{% endif %}' );
|
define( 'WP_HOME', 'http://{{ domain_name }}{% if ansible_facts["port"] is defined and ansible_facts["port"] != 22 and ansible_facts["port"] != 80 %}:{{ ansible_facts["port"] }}{% endif %}' );
|
||||||
define( 'WP_SITEURL', 'http://{{ domain_name }}{% if ansible_port is defined and ansible_port != 22 and ansible_port != 80 %}:{{ ansible_port }}{% endif %}' );
|
define( 'WP_SITEURL', 'http://{{ domain_name }}{% if ansible_facts["port"] is defined and ansible_facts["port"] != 22 and ansible_facts["port"] != 80 %}:{{ ansible_facts["port"] }}{% endif %}' );
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
// ** Weitere Einstellungen ** //
|
// ** Weitere Einstellungen ** //
|
||||||
|
|||||||
@@ -1,36 +1,26 @@
|
|||||||
# Ubuntu/Debian family variables
|
# Ubuntu/Debian family variables
|
||||||
---
|
---
|
||||||
# Package names for Ubuntu/Debian systems
|
# Package names for Ubuntu/Debian systems (PHP version is detected and installed dynamically)
|
||||||
packages:
|
packages:
|
||||||
- nginx
|
- mariadb-server
|
||||||
- mysql-server
|
|
||||||
- php8.4-fpm
|
|
||||||
- php8.4-mysql
|
|
||||||
- php8.4-curl
|
|
||||||
- php8.4-gd
|
|
||||||
- php8.4-intl
|
|
||||||
- php8.4-mbstring
|
|
||||||
- php8.4-soap
|
|
||||||
- php8.4-xml
|
|
||||||
- php8.4-xmlrpc
|
|
||||||
- php8.4-zip
|
|
||||||
- python3-pymysql
|
- python3-pymysql
|
||||||
- unzip
|
- unzip
|
||||||
- fail2ban
|
- fail2ban
|
||||||
|
- ufw
|
||||||
|
|
||||||
# Service names
|
# Service names
|
||||||
mysql_service: mysql
|
mysql_service: mariadb
|
||||||
nginx_service: nginx
|
nginx_service: nginx
|
||||||
php_fpm_service: php8.4-fpm
|
php_fpm_service: php{{ php_version }}-fpm
|
||||||
|
|
||||||
# Package manager
|
# Package manager
|
||||||
package_manager: apt
|
package_manager: apt
|
||||||
|
|
||||||
# PHP paths
|
# PHP paths (dynamic based on detected version)
|
||||||
php_fpm_config_path: /etc/php/8.4/fpm
|
php_fpm_config_path: /etc/php/{{ php_version }}/fpm
|
||||||
php_cli_config_path: /etc/php/8.4/cli
|
php_cli_config_path: /etc/php/{{ php_version }}/cli
|
||||||
php_fpm_pool_path: /etc/php/8.4/fpm/pool.d
|
php_fpm_pool_path: /etc/php/{{ php_version }}/fpm/pool.d
|
||||||
php_fpm_socket: /run/php/php8.4-fpm.sock
|
php_fpm_socket: /run/php/php{{ php_version }}-fpm.sock
|
||||||
|
|
||||||
# Nginx paths
|
# Nginx paths
|
||||||
nginx_config_path: /etc/nginx
|
nginx_config_path: /etc/nginx
|
||||||
|
|||||||
Reference in New Issue
Block a user