Files
ansible-lemp-wordpress/CONTRIBUTING.md
Sebastian Palencsar dffd8e3b76 feat: v2.5.0 - Complete Technology & Security Update
Features:
- PHP 8.4 support (from 8.3)
- WordPress 7.0 (auto-update via WP-CLI)
- Modern TLS 1.3 cipher suites (2026 best practices)
- Fail2Ban security integration (5 jails: SSH, Nginx, WordPress, recidive)
- Auto-update cron job for WordPress (weekly Minor updates)
- Debian 14 Forky support (testing)
- Ubuntu 25.04 support
- Python 3.12 in GitHub Actions

Security:
- Fail2Ban with SSH brute force protection (24h ban)
- WordPress wp-login.php protection (2h ban)
- Nginx bot scanner protection
- Recidive jail for repeat offenders (1 week ban)
- Modern TLS ciphers (AEAD only)
- HSTS 2 years for preload

Documentation:
- docs/autoupdate.md - WordPress auto-update guide
- docs/fail2ban.md - Fail2Ban configuration guide
- docs/troubleshooting.md - Updated with php_version variable

Breaking changes:
- PHP 8.4 is now the default (requires Ubuntu 20.04+ or Debian 11+)
2026-05-04 19:37:27 +02:00

5.8 KiB
Executable File

Contributing to Ansible LEMP WordPress Automation

🎉 Thank you for your interest in contributing to this project!

📋 Table of Contents

🤝 Code of Conduct

This project and everyone participating in it is governed by our commitment to creating a welcoming, diverse, and harassment-free experience for everyone.

🚀 Getting Started

Prerequisites

  • Ansible 6.0+
  • Docker (for testing)
  • Python 3.8+
  • Git

Development Setup

  1. Fork and Clone

    git clone https://github.com/yourusername/ansible-lemp-wordpress.git
    cd ansible-lemp-wordpress
    
  2. Set up Testing Environment

    # Start Docker test environment
    cd docker
    docker-compose up -d
    
    # Test the playbook
    cd ..
    ansible-playbook -i inventory/docker.yml playbooks/lemp-wordpress.yml
    
  3. Install Development Dependencies

    pip install ansible-lint yamllint
    

🛠️ How to Contribute

Types of Contributions

  • 🐛 Bug Reports: Found an issue? Please report it!
  • Feature Requests: Have an idea? We'd love to hear it!
  • 📝 Documentation: Help improve our docs
  • 🧪 Testing: Add test cases or improve existing ones
  • 🔧 Code: Fix bugs or implement new features

Areas for Contribution

  1. OS Support

    • Test on different Ubuntu/Debian versions
    • Improve OS-specific configurations
  2. Security Enhancements

    • SSL/TLS improvements
    • Security hardening features
    • Vulnerability assessments
  3. Performance Optimizations

    • Caching strategies
    • Database tuning
    • Web server optimizations
  4. Monitoring & Logging

    • Log management
    • Monitoring integration
    • Health checks
  5. Documentation

    • Tutorials and guides
    • Troubleshooting scenarios
    • Translation to other languages

🧪 Testing Guidelines

Before Submitting

  1. Lint Your Code

    ansible-lint playbooks/*.yml
    yamllint .
    
  2. Test in Docker Environment

    # Clean test
    docker-compose down -v
    docker-compose up -d
    ansible-playbook -i inventory/docker.yml playbooks/lemp-wordpress.yml
    
  3. Verify WordPress Installation

    curl -I http://localhost:8080
    curl -s http://localhost:8080/ | grep "WordPress"
    

Test Categories

  • Unit Tests: Test individual tasks
  • Integration Tests: Test complete playbook execution
  • Functional Tests: Test WordPress functionality
  • Security Tests: Verify security configurations

📤 Submitting Changes

Pull Request Process

  1. Create a Feature Branch

    git checkout -b feature/your-feature-name
    
  2. Make Your Changes

    • Follow Ansible best practices
    • Add comments for complex logic
    • Update documentation as needed
  3. Test Your Changes

    # Run all tests
    ./tests/integration-test.sh
    
    # Lint check
    ansible-lint playbooks/*.yml
    yamllint .
    
  4. Commit Your Changes

    git add .
    git commit -m "feat: add new feature description"
    
  5. Push and Create PR

    git push origin feature/your-feature-name
    

Commit Message Format

Use conventional commits format:

type(scope): description

body (optional)

footer (optional)

Types:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • test: Adding tests
  • refactor: Code refactoring
  • perf: Performance improvements
  • ci: CI/CD changes

Examples:

feat(wordpress): add multisite support
fix(nginx): correct SSL certificate path
docs(readme): update installation instructions
test(docker): add integration test for MySQL

📚 Documentation

Documentation Standards

  • Use clear, concise language
  • Include code examples
  • Add troubleshooting tips
  • Keep documentation up-to-date

Areas Needing Documentation

  • Advanced configuration scenarios (see docs/multi-environment-deployment.md)
  • Troubleshooting common issues (see docs/troubleshooting.md)
  • Performance tuning guides
  • Security best practices (see SECURITY.md and docs/vault.md)
  • Multi-environment setups (see docs/multi-environment-deployment.md)

🔧 Development Guidelines

Ansible Best Practices

  1. Use Proper YAML Syntax

    • 2-space indentation
    • Descriptive task names
    • Use --- document separator
  2. Variable Naming

    • Use descriptive names
    • Follow snake_case convention
    • Group related variables
  3. Error Handling

    • Check return codes
    • Provide meaningful error messages
    • Use failed_when when appropriate
  4. Idempotency

    • Ensure tasks are idempotent
    • Use appropriate modules
    • Test multiple runs

Template Guidelines

  • Use Jinja2 best practices
  • Comment complex logic
  • Handle undefined variables gracefully
  • Test with different variable combinations

🙋‍♀️ Getting Help

  • Issues: Check existing issues or create a new one
  • Discussions: Use GitHub Discussions for questions
  • Documentation: Refer to our comprehensive docs in the docs/ directory

🎯 Project Roadmap

Planned Features

  • WordPress Multisite automation
  • Advanced backup strategies
  • Monitoring integration (Prometheus/Grafana)
  • Cluster deployment support
  • Advanced SSL management (implemented in lemp-wordpress-ultimate.yml)
  • Database replication setup

Help Wanted

Look for issues labeled:

  • good first issue
  • help wanted
  • documentation
  • testing

Thank you for contributing to make this project better! 🚀