This role installs and configures lighttpd.
No special requirements;
Note, however that this role requires root access, so either run it in a playbook with a global become: yes
, or invoke the role in your playbook like:
- hosts: webserver
roles:
- role: bithium.lighttpd
become: yes
Available variables are listed below, along with default values (see defaults/main.yml
and vars/main.yml
):
-
Packages to install for each OS:
lighttpd_package
lighttpd_package: "lighttpd" lighttpd_packages: - "{{lighttpd_package}}"
-
Service name for lighttpd:
lighttpd_service: lighttpd
-
User used to run the server:
lighttpd_user
-
Group used to run the server:
lighttpd_group
-
Base configuration path:
lighttpd_config_path
-
Available configurations path:
lighttpd_config_available_path: "{{lighttpd_config_path}}/conf-available"
-
Available sites configuration path:
lighttpd_sites_available_path: "{{lighttpd_config_available_path}}"
-
Enabled configurations path:
lighttpd_config_enabled_path: "{{lighttpd_config_path}}/conf-enabled"
-
Enabled sites configuration path:
lighttpd_sites_enabled_path: "{{lighttpd_config_enabled_path}}"
-
Main configuration file:
lighttpd_config_file: "{{lighttpd_config_path}}/lighttpd.conf"
-
Configuration file created by this role:
lighttpd_extra_config_file: "{{lighttpd_config_enabled_dir}}/25_ansible.conf"
-
Configuration modules to add to the configuration:
lighttpd_modules: - status - userdir
-
Custom configuration options:
This is an hash with the options that will be, either:
- replaced in
lighttpd_config_file
, or - placed in
lighttpd_extra_config_file
askey = value
, e.g:
lighttpd_config: server.port: 8080 server.document-root: "/tmp/foobar" fastcgi.debug: 1
- replaced in
No dependencies.
This example playbook enables the fastcgi
module and starts the server on port 3000.
---
- hosts: webserver
become: yes
vars:
lighttpd_modules:
- fastcgi # Enable FastCGI
lighttpd_config:
server.port: 3000
roles:
- lighttpd
Apache 2.0