Commit 815190ad authored by Pietsch, Martin's avatar Pietsch, Martin

move commit

parents
Description
===========
This role installs a HTTP server based on lighttpd.
Requirement
===========
Variables
---------
- lighttpd_datadirectory:
description:
- path to the data directory
default: /var/www
- lighttpd_configfile:
description:
- path to the configuration file of lighttpd
default: /usr/local/etc/lighttpd/lighttpd.conf
Process
=======
main
----
1. install and enable lighttpd
2. copy lighttpd configuration
3. create lighttpd directory
4. start lighttpd
configure
---------
1. NOP
---
lighttpd_datadirectory: "/var/www"
lighttpd_configfile: "/usr/local/etc/lighttpd/lighttpd.conf"
package_packages: {
"freebsd": ["lighttpd"]
}
package_service: {
"freebsd": "lighttpd"
}
---
- name: install lighttpd
import_role:
name: package
- name: copy lighttpd configuration
template:
src: lighttpd.conf.j2
dest: "{{ lighttpd_configfile }}"
owner: root
group: wheel
mode: 0644
- name: create lighttpd data directory
file:
path: "{{ lighttpd_datadirectory }}"
state: directory
mode: 0755
- name: start lighttpd
service:
name: "{{ service[os.distribution | lower()] }}"
state: started
dir-listing.encoding = "utf-8"
server.dir-listing = "enable"
server.document-root = "{{ lighttpd_datadirectory }}"
server.username = "nobody"
server.groupname = "nobody"
server.pid-file = "/var/run/lighttpd.pid"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment