hammadrauf.apache2

Ansible Role: Apache2

This role is used to install Apache2 (or HTTPD) on Debian-based operating systems. It also works on RHEL-based systems. It can set up common configurations for Apache2, such as creating Virtual Hosts and setting up SSL (both Self-Signed and using CertBot).

Requirements

You need any Debian or RHEL-based Virtual Machine or physical server where the Ansible user has SUDO permissions and Python3 installed.

Role Variables

For a full list, please check defaults/main.yml.

Here are optional files or templates for the default homepage:

ap2_template_index: ./some/path/index.html.j2
ap2_file_css: ./some/path/site_style.css
ap2_file_ico: ./some/path/favicon.ico

The following structure is still being developed:

ap2_virtualhosts:
  - directory: "/var/www/html"
    contextroot: "/"
    domainname: "www.abc.net"
    port80: true
    port443: true
    port80redirect: true
    ssl_enabled: true
    ssl_self_signed: false
    ssl_certbot: true

Dependencies

There are no dependencies.

Example Playbook

    - hosts: servers
      roles:
         - role: hammadrauf.apache2

Testing with Molecule

To launch Podman instances outside of Molecule/Ansible, use the following commands:

podman run -d --name debian12 --hostname debian12 -it docker.io/hammadrauf/dockerdeb12:latest sleep infinity & wait
podman run -d --name fedora40 --hostname fedora40 -it docker.io/hammadrauf/fedora40:latest
podman run -d --name ubuntu --hostname ubuntu -it docker.io/hammadrauf/ubuntunoble:latest sleep infinity & wait

License

MIT

Author Information

This role was created on May 9, 2024, by Hammad Rauf.

Informazioni sul progetto

Debian/RHEL installation of Apache2/Httpd and some basic configuration of Websites.

Installa
ansible-galaxy install hammadrauf.apache2
Licenza
Unknown
Download
83
Proprietario