Add installing and configuring lighttpd server 20/85520/10
authorAdam Malinowski <a.malinowsk2@partner.samsung.com>
Thu, 25 Aug 2016 12:23:55 +0000 (14:23 +0200)
committerAdam Malinowski <a.malinowsk2@partner.samsung.com>
Tue, 20 Dec 2016 10:33:25 +0000 (11:33 +0100)
Change-Id: Ia5fcef16eda907e39cad283905b4c58fdd7465f6

config/hosts/master/roles/system/tasks/main.yml

index 92cb500..18ff32e 100644 (file)
     - wget
     - task-spooler
     - python-bs4
+    - lighttpd
     - git
 
+- name: Configure lighttpd - document root
+  lineinfile:
+    dest: /etc/lighttpd/lighttpd.conf
+    state: present
+    regexp: '^server.document-root'
+    line: 'server.document-root        = "/home/{{ username }}/ws"'
+
+- name: Configure lighttpd - index files
+  lineinfile:
+    dest: /etc/lighttpd/lighttpd.conf
+    state: present
+    regexp: '^index-file.names'
+    line: 'index-file.names            = ( "index.php", "index.html", "index.lighttpd.html", "current_status.html" )'
+
+- name: Configure lighttpd - enable dir listing configuration
+  file:
+    dest: /etc/lighttpd/conf-enabled/10-dir-listing.conf
+    src: /etc/lighttpd/conf-available/10-dir-listing.conf
+    state: link
+
 - name: Set http_proxy environment variable
   lineinfile:
     dest: /etc/environment