Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da2f0876dd | ||
|
|
cfb63da386 | ||
|
|
55193c7bd4 | ||
|
|
2aa5480d17 | ||
|
|
168c59f3ea | ||
|
|
58ffb82378 | ||
|
|
38241f82e3 | ||
|
|
9eac2c2057 | ||
|
|
feb6a2c962 | ||
|
|
619205e0a8 | ||
|
|
1361466dfe | ||
|
|
1fa863f107 | ||
|
|
605b4e8c7b | ||
|
|
e5b0a80bb2 | ||
|
|
c2b4181756 | ||
|
|
9f8e4d980b | ||
|
|
d0781f2102 | ||
|
|
a9d3c851a4 | ||
|
|
451cdad6e9 | ||
|
|
2e219d928a | ||
|
|
d52c996414 |
57
.github/workflows/ci-cd.yml
vendored
57
.github/workflows/ci-cd.yml
vendored
@@ -1,12 +1,16 @@
|
|||||||
name: CI/CD Pipeline
|
name: CI/CD Pipeline
|
||||||
# Updated: Removed systemd, using SSH-based testing for better stability
|
# Updated: Dynamic tag for release, CodeQL v4, Node.js 24 support
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main, develop ]
|
branches: [ main, develop ]
|
||||||
|
tags: [ 'v*' ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
name: Lint Ansible Playbooks
|
name: Lint Ansible Playbooks
|
||||||
@@ -14,10 +18,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
python-version: '3.12'
|
||||||
|
|
||||||
@@ -38,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:
|
||||||
@@ -48,14 +57,22 @@ jobs:
|
|||||||
needs: lint
|
needs: lint
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
ubuntu_version: ['20.04', '22.04', '24.04', '25.04']
|
include:
|
||||||
|
- ubuntu_version: '22.04'
|
||||||
|
allow_failure: false
|
||||||
|
- ubuntu_version: '24.04'
|
||||||
|
allow_failure: false
|
||||||
|
- ubuntu_version: '25.04'
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
|
continue-on-error: ${{ matrix.allow_failure }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
|
|
||||||
@@ -77,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
|
||||||
@@ -93,10 +110,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "Testing basic container setup for Ubuntu ${{ matrix.ubuntu_version }}..."
|
echo "Testing basic container setup for Ubuntu ${{ matrix.ubuntu_version }}..."
|
||||||
docker run --rm ubuntu:${{ matrix.ubuntu_version }} /bin/bash -c "
|
docker run --rm ubuntu:${{ matrix.ubuntu_version }} /bin/bash -c "
|
||||||
export DEBIAN_FRONTEND=noninteractive &&
|
set -e &&
|
||||||
apt-get update &&
|
grep '^NAME=' /etc/os-release &&
|
||||||
apt-get install -y python3 python3-apt &&
|
grep '^VERSION_ID=' /etc/os-release &&
|
||||||
python3 --version &&
|
bash --version > /dev/null &&
|
||||||
echo 'Ubuntu ${{ matrix.ubuntu_version }} container test successful'"
|
echo 'Ubuntu ${{ matrix.ubuntu_version }} container test successful'"
|
||||||
|
|
||||||
|
|
||||||
@@ -110,7 +127,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Run Trivy vulnerability scanner
|
- name: Run Trivy vulnerability scanner
|
||||||
uses: aquasecurity/trivy-action@master
|
uses: aquasecurity/trivy-action@master
|
||||||
@@ -121,7 +138,7 @@ jobs:
|
|||||||
output: 'trivy-results.sarif'
|
output: 'trivy-results.sarif'
|
||||||
|
|
||||||
- name: Upload Trivy scan results to GitHub Security tab
|
- name: Upload Trivy scan results to GitHub Security tab
|
||||||
uses: github/codeql-action/upload-sarif@v3 # Updated to v3 to fix deprecated v2 warning
|
uses: github/codeql-action/upload-sarif@v4
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
sarif_file: 'trivy-results.sarif'
|
sarif_file: 'trivy-results.sarif'
|
||||||
@@ -130,23 +147,21 @@ jobs:
|
|||||||
name: Create Release
|
name: Create Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [test-ubuntu, security-scan]
|
needs: [test-ubuntu, security-scan]
|
||||||
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push'
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Get latest tag
|
- name: Get current tag
|
||||||
id: get_tag
|
id: get_tag
|
||||||
run: |
|
run: |
|
||||||
# Get the latest tag, default to v1.0.0 if none exist
|
echo "latest_tag=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT
|
||||||
latest_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo "v2.5.0")
|
echo "Using tag: ${GITHUB_REF_NAME}"
|
||||||
echo "latest_tag=$latest_tag" >> $GITHUB_OUTPUT
|
|
||||||
echo "Found latest tag: $latest_tag"
|
|
||||||
|
|
||||||
- name: Generate changelog
|
- name: Generate changelog
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Contributing guidelines and troubleshooting guide
|
- Contributing guidelines and troubleshooting guide
|
||||||
- Docker testing environment
|
- Docker testing environment
|
||||||
- Multi-environment support (Docker, VMs, bare metal)
|
- Multi-environment support (Docker, VMs, bare metal)
|
||||||
- Ubuntu/Debian support (20.04, 22.04, 24.04, Debian 11, 12)
|
- Ubuntu/Debian support (22.04, 24.04, 25.04, Debian 12, 13, 14)
|
||||||
- 🌍 Multilingual documentation (German, Hungarian translations)
|
- 🌍 Multilingual documentation (German, Hungarian translations)
|
||||||
- 🧪 Simplified and robust CI/CD testing approach
|
- 🧪 Simplified and robust CI/CD testing approach
|
||||||
- 📝 Professional language navigation in README
|
- 📝 Professional language navigation in README
|
||||||
|
|||||||
13
README.md
13
README.md
@@ -3,8 +3,8 @@
|
|||||||
🚀 **Production-ready, fully automated LEMP stack (Linux, Nginx, MySQL, PHP) + WordPress deployment using Ansible**
|
🚀 **Production-ready, fully automated LEMP stack (Linux, Nginx, MySQL, PHP) + WordPress deployment using Ansible**
|
||||||
|
|
||||||
[](https://opensource.org/licenses/MIT)
|
[](https://opensource.org/licenses/MIT)
|
||||||
[](https://ubuntu.com/)
|
[](https://ubuntu.com/)
|
||||||
[](https://debian.org/)
|
[](https://debian.org/)
|
||||||
[](https://www.ansible.com/)
|
[](https://www.ansible.com/)
|
||||||
[](https://wordpress.org/)
|
[](https://wordpress.org/)
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
- Nginx web server with production-ready optimization
|
- Nginx web server with production-ready optimization
|
||||||
- MySQL 8.0+ with secure setup and performance tuning
|
- MySQL 8.0+ with secure setup and performance tuning
|
||||||
- PHP 8.4+ with FPM, OPcache and WordPress extensions
|
- PHP 8.4+ with FPM, OPcache and WordPress extensions
|
||||||
- Ubuntu/Debian family support (20.04, 22.04, 24.04, Debian 11, 12)
|
- Ubuntu/Debian family support (22.04, 24.04, 25.04, Debian 12, 13, 14)
|
||||||
|
|
||||||
### 🛡️ WordPress & Security
|
### 🛡️ WordPress & Security
|
||||||
✅ **WordPress Automation & Security**
|
✅ **WordPress Automation & Security**
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
- **Control Machine**: Ansible 6.0+ installed
|
- **Control Machine**: Ansible 6.0+ installed
|
||||||
- **Target Server**: Ubuntu 20.04+ or Debian 11+ with SSH access and sudo privileges
|
- **Target Server**: Ubuntu 22.04+ or Debian 12+ with SSH access and sudo privileges
|
||||||
- **Network**: SSH access (port 22) and web access (ports 80/443)
|
- **Network**: SSH access (port 22) and web access (ports 80/443)
|
||||||
|
|
||||||
### 1. Clone Repository
|
### 1. Clone Repository
|
||||||
@@ -212,7 +212,7 @@ nginx_optimization_enabled: true
|
|||||||
```
|
```
|
||||||
### Server Requirements
|
### Server Requirements
|
||||||
|
|
||||||
- **OS**: Ubuntu 20.04+ or Debian 11+
|
- **OS**: Ubuntu 22.04+ or Debian 12+
|
||||||
- **RAM**: Minimum 1GB (2GB+ recommended for Ultimate mode)
|
- **RAM**: Minimum 1GB (2GB+ recommended for Ultimate mode)
|
||||||
- **Storage**: Minimum 10GB free space
|
- **Storage**: Minimum 10GB free space
|
||||||
- **Network**: SSH access + web ports (80/443)
|
- **Network**: SSH access + web ports (80/443)
|
||||||
@@ -299,8 +299,7 @@ ansible-playbook -i inventory/production.yml playbooks/lemp-wordpress-ultimate.y
|
|||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
| Ubuntu | 25.04 | ✅ Supported | Interim release |
|
| Ubuntu | 25.04 | ✅ Supported | Interim release |
|
||||||
| Ubuntu | 24.04 LTS | ✅ Fully Tested | Recommended |
|
| Ubuntu | 24.04 LTS | ✅ Fully Tested | Recommended |
|
||||||
| Ubuntu | 22.04 LTS | ✅ Fully Tested | Recommended |
|
| Ubuntu | 22.04 LTS | ✅ Supported | Legacy support |
|
||||||
| Ubuntu | 20.04 LTS | ✅ Supported | Tested |
|
|
||||||
| Debian | 14 | 🔶 Testing | Forky (upcoming) |
|
| Debian | 14 | 🔶 Testing | Forky (upcoming) |
|
||||||
| Debian | 13 | ✅ Supported | Current stable |
|
| Debian | 13 | ✅ Supported | Current stable |
|
||||||
| Debian | 12 | ✅ Supported | Compatible |
|
| Debian | 12 | ✅ Supported | Compatible |
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -70,8 +70,8 @@ ansible-lemp-wordpress/
|
|||||||
## 🚀 Supported Environments
|
## 🚀 Supported Environments
|
||||||
|
|
||||||
### Operating Systems
|
### Operating Systems
|
||||||
- ✅ **Ubuntu** 20.04, 22.04, 24.04, 25.04 (fully tested)
|
- ✅ **Ubuntu** 22.04, 24.04, 25.04 (fully tested)
|
||||||
- ✅ **Debian** 11, 12, 13, 14 (compatible)
|
- ✅ **Debian** 12, 13, 14 (compatible)
|
||||||
|
|
||||||
### Deployment Targets
|
### Deployment Targets
|
||||||
- ✅ **Docker** containers (development/testing with included setup)
|
- ✅ **Docker** containers (development/testing with included setup)
|
||||||
@@ -180,7 +180,7 @@ ansible-playbook -i inventory/production.yml playbooks/lemp-wordpress-ultimate.y
|
|||||||
|
|
||||||
- **Total Files**: ~30 (clean, focused codebase)
|
- **Total Files**: ~30 (clean, focused codebase)
|
||||||
- **Lines of Code**: ~2,000 (Ansible YAML, Jinja2, Documentation)
|
- **Lines of Code**: ~2,000 (Ansible YAML, Jinja2, Documentation)
|
||||||
- **Supported OS**: Ubuntu 20.04/22.04/24.04/25.04, Debian 11/12/13/14
|
- **Supported OS**: Ubuntu 22.04/24.04/25.04, Debian 12/13/14
|
||||||
- **Deployment Modes**: 2 (Basic + Ultimate)
|
- **Deployment Modes**: 2 (Basic + Ultimate)
|
||||||
- **Templates**: 5 (production-tested)
|
- **Templates**: 5 (production-tested)
|
||||||
- **Documentation Pages**: 9 comprehensive guides (README + 8 in docs/)
|
- **Documentation Pages**: 9 comprehensive guides (README + 8 in docs/)
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
🚀 **Produktionsreife, vollautomatisierte LEMP-Stack (Linux, Nginx, MySQL, PHP) + WordPress-Bereitstellung mit Ansible**
|
🚀 **Produktionsreife, vollautomatisierte LEMP-Stack (Linux, Nginx, MySQL, PHP) + WordPress-Bereitstellung mit Ansible**
|
||||||
|
|
||||||
[](https://opensource.org/licenses/MIT)
|
[](https://opensource.org/licenses/MIT)
|
||||||
[](https://ubuntu.com/)
|
[](https://ubuntu.com/)
|
||||||
[](https://debian.org/)
|
[](https://debian.org/)
|
||||||
[](https://www.ansible.com/)
|
[](https://www.ansible.com/)
|
||||||
[](https://wordpress.org/)
|
[](https://wordpress.org/)
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
- Nginx-Webserver mit produktionsreifer Optimierung
|
- Nginx-Webserver mit produktionsreifer Optimierung
|
||||||
- MySQL 8.0+ mit sicherer Einrichtung und Performance-Tuning
|
- MySQL 8.0+ mit sicherer Einrichtung und Performance-Tuning
|
||||||
- PHP 8.4+ mit FPM, OPcache und WordPress-Erweiterungen
|
- PHP 8.4+ mit FPM, OPcache und WordPress-Erweiterungen
|
||||||
- Ubuntu/Debian-Familie Unterstützung (20.04, 22.04, 24.04, 25.04, Debian 11, 12, 13, 14)
|
- Ubuntu/Debian-Familie Unterstützung (22.04, 24.04, 25.04, Debian 12, 13, 14)
|
||||||
|
|
||||||
### 🛡️ WordPress & Sicherheit
|
### 🛡️ WordPress & Sicherheit
|
||||||
✅ **WordPress-Automatisierung & Sicherheit**
|
✅ **WordPress-Automatisierung & Sicherheit**
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
### Voraussetzungen
|
### Voraussetzungen
|
||||||
|
|
||||||
- **Ansible** 6.0+ auf Ihrem lokalen Rechner
|
- **Ansible** 6.0+ auf Ihrem lokalen Rechner
|
||||||
- **Ubuntu/Debian-Server** (20.04+, Debian 11+)
|
- **Ubuntu/Debian-Server** (22.04+, Debian 12+)
|
||||||
- **SSH-Zugang** zu Ihren Zielservern
|
- **SSH-Zugang** zu Ihren Zielservern
|
||||||
- **sudo-Berechtigung** auf Zielservern
|
- **sudo-Berechtigung** auf Zielservern
|
||||||
|
|
||||||
@@ -213,7 +213,7 @@ nginx_optimization_enabled: true
|
|||||||
|
|
||||||
### Server-Anforderungen
|
### Server-Anforderungen
|
||||||
|
|
||||||
- **OS**: Ubuntu 20.04+ oder Debian 11+
|
- **OS**: Ubuntu 22.04+ oder Debian 12+
|
||||||
- **RAM**: Mindestens 1GB (2GB+ empfohlen für Ultimate Modus)
|
- **RAM**: Mindestens 1GB (2GB+ empfohlen für Ultimate Modus)
|
||||||
- **Speicher**: Mindestens 10GB freier Speicherplatz
|
- **Speicher**: Mindestens 10GB freier Speicherplatz
|
||||||
- **Netzwerk**: SSH-Zugang + Web-Ports (80/443)
|
- **Netzwerk**: SSH-Zugang + Web-Ports (80/443)
|
||||||
@@ -296,11 +296,12 @@ ansible-playbook -i inventory/production.yml playbooks/lemp-wordpress-ultimate.y
|
|||||||
|
|
||||||
| OS | Version | Status | Hinweise |
|
| OS | Version | Status | Hinweise |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
|
| Ubuntu | 25.04 | ✅ Unterstützt | Interim Release |
|
||||||
| Ubuntu | 24.04 LTS | ✅ Vollständig getestet | Empfohlen |
|
| Ubuntu | 24.04 LTS | ✅ Vollständig getestet | Empfohlen |
|
||||||
| Ubuntu | 22.04 LTS | ✅ Vollständig getestet | Empfohlen |
|
| Ubuntu | 22.04 LTS | ✅ Vollständig getestet | Empfohlen |
|
||||||
| Ubuntu | 20.04 LTS | ✅ Unterstützt | Getestet |
|
| Debian | 14 | 🔶 Testing | Forky (bevorstehend) |
|
||||||
|
| Debian | 13 | ✅ Unterstützt | Aktuell stabil |
|
||||||
| Debian | 12 | ✅ Unterstützt | Kompatibel |
|
| Debian | 12 | ✅ Unterstützt | Kompatibel |
|
||||||
| Debian | 11 | ✅ Unterstützt | Kompatibel |
|
|
||||||
|
|
||||||
## 📚 Dokumentation
|
## 📚 Dokumentation
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
🚀 **Termelésre kész, teljesen automatizált LEMP stack (Linux, Nginx, MySQL, PHP) + WordPress telepítés Ansible-lel**
|
🚀 **Termelésre kész, teljesen automatizált LEMP stack (Linux, Nginx, MySQL, PHP) + WordPress telepítés Ansible-lel**
|
||||||
|
|
||||||
[](https://opensource.org/licenses/MIT)
|
[](https://opensource.org/licenses/MIT)
|
||||||
[](https://ubuntu.com/)
|
[](https://ubuntu.com/)
|
||||||
[](https://debian.org/)
|
[](https://debian.org/)
|
||||||
[](https://www.ansible.com/)
|
[](https://www.ansible.com/)
|
||||||
[](https://wordpress.org/)
|
[](https://wordpress.org/)
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
- Nginx webszerver termelésre kész optimalizálással
|
- Nginx webszerver termelésre kész optimalizálással
|
||||||
- MySQL 8.0+ biztonságos beállítással és teljesítmény-hangolással
|
- MySQL 8.0+ biztonságos beállítással és teljesítmény-hangolással
|
||||||
- PHP 8.4+ FPM-mel, OPcache-sel és WordPress bővítményekkel
|
- PHP 8.4+ FPM-mel, OPcache-sel és WordPress bővítményekkel
|
||||||
- Ubuntu/Debian család támogatás (20.04, 22.04, 24.04, 25.04, Debian 11, 12, 13, 14)
|
- Ubuntu/Debian család támogatás (22.04, 24.04, 25.04, Debian 12, 13, 14)
|
||||||
|
|
||||||
### 🛡️ WordPress és Biztonság
|
### 🛡️ WordPress és Biztonság
|
||||||
✅ **WordPress automatizálás és biztonság**
|
✅ **WordPress automatizálás és biztonság**
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
### Előfeltételek
|
### Előfeltételek
|
||||||
|
|
||||||
- **Ansible** 6.0+ a helyi gépén
|
- **Ansible** 6.0+ a helyi gépén
|
||||||
- **Ubuntu/Debian szerver** (20.04+, Debian 11+)
|
- **Ubuntu/Debian szerver** (22.04+, Debian 12+)
|
||||||
- **SSH hozzáférés** a célszerverekhez
|
- **SSH hozzáférés** a célszerverekhez
|
||||||
- **sudo jogosultságok** a célszervereken
|
- **sudo jogosultságok** a célszervereken
|
||||||
|
|
||||||
@@ -213,7 +213,7 @@ nginx_optimization_enabled: true
|
|||||||
|
|
||||||
### Szerver követelmények
|
### Szerver követelmények
|
||||||
|
|
||||||
- **OS**: Ubuntu 20.04+ vagy Debian 11+
|
- **OS**: Ubuntu 22.04+ vagy Debian 12+
|
||||||
- **RAM**: Minimum 1GB (2GB+ ajánlott Ultimate módhoz)
|
- **RAM**: Minimum 1GB (2GB+ ajánlott Ultimate módhoz)
|
||||||
- **Tárhely**: Minimum 10GB szabad hely
|
- **Tárhely**: Minimum 10GB szabad hely
|
||||||
- **Hálózat**: SSH hozzáférés + web portok (80/443)
|
- **Hálózat**: SSH hozzáférés + web portok (80/443)
|
||||||
@@ -296,11 +296,12 @@ ansible-playbook -i inventory/production.yml playbooks/lemp-wordpress-ultimate.y
|
|||||||
|
|
||||||
| OS | Verzió | Státusz | Megjegyzések |
|
| OS | Verzió | Státusz | Megjegyzések |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
|
| Ubuntu | 25.04 | ✅ Támogatott | Interim Release |
|
||||||
| Ubuntu | 24.04 LTS | ✅ Teljesen tesztelt | Ajánlott |
|
| Ubuntu | 24.04 LTS | ✅ Teljesen tesztelt | Ajánlott |
|
||||||
| Ubuntu | 22.04 LTS | ✅ Teljesen tesztelt | Ajánlott |
|
| Ubuntu | 22.04 LTS | ✅ Teljesen tesztelt | Ajánlott |
|
||||||
| Ubuntu | 20.04 LTS | ✅ Támogatott | Tesztelt |
|
| Debian | 14 | 🔶 Tesztelés | Forky (közelgő) |
|
||||||
|
| Debian | 13 | ✅ Támogatott | Aktuális stabil |
|
||||||
| Debian | 12 | ✅ Támogatott | Kompatibilis |
|
| Debian | 12 | ✅ Támogatott | Kompatibilis |
|
||||||
| Debian | 11 | ✅ Támogatott | Kompatibilis |
|
|
||||||
|
|
||||||
## 📚 Dokumentáció
|
## 📚 Dokumentáció
|
||||||
|
|
||||||
|
|||||||
@@ -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