jonaspammer.apache2
Ansible Role for Apache2
Note: This file is automatically created. Any local changes will not be saved!
Overview
This Ansible role helps you to install Apache2. It allows you to enable or disable modules, change default settings, and create virtual hosts.
Metadata
- Role name: apache2
- Created by: Jonas Pammer opensource@jonaspammer.at
- License: MIT
- Minimum Ansible version: 2.11
- Supported Platforms:
- Enterprise Linux (EL): 9 (tested on Rocky Linux 9)
- Fedora: 38, 39
- Debian: Bullseye (Debian 11), Bookworm (Debian 12)
- Ubuntu: Focal (Ubuntu 20.04), Jammy (Ubuntu 22.04)
- Tags: web, apache, webserver, html, httpd
- Dependencies: None listed
Requirements
- The Ansible user needs the ability to
become
(escalate privileges). - For SSL/TLS usage, you must provide your own certificate and key files.
- If you want to use PHP, consider using the geerlingguy.php role or connect Apache with PHP via FPM.
Role Variables
You can set the following variables for customization:
- apache_mods_enabled: Modules to enable (default:
rewrite
,ssl
) - apache_listen_ip: IP address for Apache to listen (default:
*
) - apache_listen_port: Port for plain HTTP (default:
80
) - apache_listen_port_ssl: Port for HTTPS (default:
443
) - apache_remove_default_vhost: Remove default vhost on Debian/Ubuntu (default:
false
) - apache_state: Initial state of Apache (default:
started
) - apache_enabled: Control Apache service status (default:
true
) - apache_vhosts: List of virtual hosts to create with properties like
servername
,documentroot
, etc.
Example Playbook
To use this role in a playbook:
- hosts: all
become: true
roles:
- role: jonaspammer.apache2
Logging
You can specify custom logs for your virtual hosts.
Additional Information
For details about using this role or to contribute, please check the full documentation linked above.
License: MIT License. Please refer to the License section of the main document for further details.
Feel free to reach out if you need further assistance!
Informazioni sul progetto
An ansible role for installing Apache2, enabling/disabling modules, configuring its defaults and creating virtual hosts.
Installa
ansible-galaxy install jonaspammer.apache2
Licenza
mit
Download
21.3k
Proprietario
DevOps is just FullStack with one additional layer