Commit c3f8386b authored by Pietsch, Martin's avatar Pietsch, Martin

Merge branch 'master' of gitlab.math.tu-dresden.de:sdm/package.lighttpd

parents 54cf3dbb 28017bb5
---
lighttpd_datadirectory: "/var/www"
lighttpd_configfile: "/usr/local/etc/lighttpd/lighttpd.conf"
package_packages: {
"freebsd": ["lighttpd"]
}
package_service: {
"freebsd": "lighttpd"
}
---
- name: copy lighttpd configuration
template:
src: "{{ lighttpd_configfile }}"
dest: "{{ system_config_directory }}/lighttpd/lighttpd.conf"
owner: root
group: wheel
mode: 0644
- name: start lighttpd
service:
name: "{{ _service }}"
state: started
loop: "{{ package_services[os.distribution | lower()] }}"
loop_control:
loop_var: _service
register: _lighttpd_started
- name: reload lighttpd
service:
name: "{{ _service }}"
state: started
loop: "{{ package_services[os.distribution | lower()] }}"
loop_control:
loop_var: _service
when: _lighttpd_started.changed == False
......@@ -4,23 +4,13 @@
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: "{{ package_service[os.distribution | lower()] }}"
state: started
- include_role:
name: package.lighttpd
tasks_from: configure
......@@ -2,7 +2,19 @@ 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"
index-file.names = ( "index.html" )
mimetype.assign = (
".html" => "text/html",
".txt" => "text/plain",
".css" => "text/css",
".js" => "application/x-javascript",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".gif" => "image/gif",
".png" => "image/png",
"" => "application/octet-stream"
)
---
lighttpd_datadirectory: "/var/www"
lighttpd_configfile: "lighttpd.conf.j2"
package_packages: {
"freebsd": ["lighttpd"]
}
package_services: {
"freebsd": ["lighttpd"]
}
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