Skip to content

Ansible role to install and configure an Apache webserver

License

Notifications You must be signed in to change notification settings

rolehippie/apache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

apache

Source Code General Workflow Readme Workflow Galaxy Workflow License: Apache-2.0 Ansible Role

Ansible role to install and configure an Apache webserver.

Sponsor

Building and improving this Ansible role have been sponsored by my current and previous employers like Cloudpunks GmbH and Proact Deutschland GmbH.

Table of content


Requirements

  • Minimum Ansible version: 2.10

Default Variables

apache_default_server_listen

Listening address of default vhost

Default value

apache_default_server_listen: 0.0.0.0:80

apache_default_server_name

Optional default server name

Default value

apache_default_server_name:

Example usage

apache_default_server_name: server.example.com

apache_error_pages

Path to error page files

Default value

apache_error_pages: error

apache_exporter_args

Optional list of additional arguments for the apache exporter

Default value

apache_exporter_args: []

apache_exporter_download

URL to the apache exporter to install

Default value

apache_exporter_download: https://github.com/Lusitaniae/apache_exporter/releases/download/v{{
  apache_exporter_version }}/apache_exporter-{{ apache_exporter_version }}.linux-amd64.tar.gz

apache_exporter_enabled

Enable the installation of the apache exporter

Default value

apache_exporter_enabled: true

apache_exporter_scrape_uri

Scrape URI of the exporter

Default value

apache_exporter_scrape_uri: http://{{ 'localhost' if apache_default_server_listen
  == '0.0.0.0:80' else apache_default_server_listen }}/server-status/?auto

apache_exporter_version

Version of the apache exporter to install

Default value

apache_exporter_version: 1.0.9

apache_extra_modules

List of additional modules to enable

Default value

apache_extra_modules: []

Example usage

apache_extra_modules:
  - proxy
  - name: ssl
    state: present
  - name: foobar
    state: absent

apache_extra_packages

List of additional packages to install

Default value

apache_extra_packages: []

apache_general_modules

List of modules to enable

Default value

apache_general_modules:
  - name: rpaf
    state: present
  - name: ssl
    state: present
  - name: rewrite
    state: present
  - name: include
    state: present
  - name: alias
    state: present
  - name: negotiation
    state: present

Example usage

apache_general_modules:
  - proxy
  - name: ssl
    state: present
  - name: foobar
    state: absent

apache_general_packages

List of packages to install

Default value

apache_general_packages:
  - apache2
  - apachetop
  - libapache2-mod-rpaf

apache_index_content

Optional content for index page

Default value

apache_index_content:

apache_keep_index

Keep an empty index page

Default value

apache_keep_index: true

apache_language_priority

List of language priorities for error pages

Default value

apache_language_priority:
  - de
  - en
  - cs
  - es
  - fr
  - it
  - nl
  - sv
  - pt-br
  - ro

apache_listen

List of ports to listen to

Default value

apache_listen:
  - 80

Example usage

apache_listen:
  - 80
  - 127.0.0.1:8080

apache_server_admin

Email address of server admin

Default value

apache_server_admin: hostmaster@localhost

apache_server_signature

Display server version and virtual host name

Default value

apache_server_signature: Off

apache_server_tokens

What you return as the server HTTP response

Default value

apache_server_tokens: Prod

apache_trace_enable

Allow TRACE method for the webserver

Default value

apache_trace_enable: Off

Discovered Tags

apache

apache-exporter

Dependencies

License

Apache-2.0

Author

Thomas Boerger