thorian93.apache2
Ansible Role: Apache2
This role installs and sets up the Apache2 web server on Debian/Ubuntu, RHEL/CentOS, and Fedora servers.
Warning!
This role is mainly for my personal use. I can't promise that it will work well for you. Please read the role carefully before using it!
Requirements
No special requirements, but this role needs root access. You can either run it in a playbook with become: yes
or include it like this:
- hosts: foobar
roles:
- role: thorian93.apache2
become: yes
Role Variables
Here are the available variables and their default values (see defaults/main.yml
):
apache2_disable_default_site: 'true'
This will disable the default site that comes with the Apache2 installation.
Dependencies
None.
OS Compatibility
This role checks the operating system to ensure it's being used on supported versions. It looks for the proper distribution name and major version in a variable called <role-name>_stable_os
. You can find this variable in the role's defaults file at defaults/main.yml
:
role_stable_os:
- Debian 10
- Ubuntu 18
- CentOS 7
- Fedora 30
If the distribution and version do not match the target system, the role will fail. If you need to use it on a different version, add that version to the variable carefully and test it first!
Thanks to HarryHarcourt for this idea!
Example Playbook
---
- name: "Run role."
hosts: all
become: yes
roles:
- ansible-role-apache2
Contributing
Feel free to report any bugs or problems you find, or suggest improvements. You can also reach out to me anytime for questions or discussions.
Disclaimer
This role is provided as-is. I can't guarantee that it will work as expected, and I'm not responsible for any issues it may cause. Please review the role thoroughly before using it.
License
MIT
Author Information
This role was created in 2020 by Thorian93.
ansible-galaxy install thorian93.apache2