blob: 2f65c7a549ef7c36f90d11bd9a328c469c0b7544 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# This playbook install the lighttpd with FastCGI and PHP.
#
# Copyright (c) 2013-2017 Fabian Affolter <fabian@affolter-engineering.ch>
#
# Licensed under CC BY 3.0. All rights reserved.
#
---
- name: install the lighttpd web server
command: /sbin/apk add lighttpd
- name: install php packages
command: /sbin/apk add $item
with_items:
- php-common
- php-iconv
- php-json
- php-gd
- php-curl
- php-xml
- php-pgsql
- php-imap
- php-pdo
- php-pdo_pgsql
- php-soap
- php-xmlrpc
- php-posix
- php-mcrypt
- php-gettext
- php-ldap
- php-ctype
- php-dom
- name: enable fastcgi support in lighttpd.conf
lineinfile: dest=/etc/lighttpd/lighttpd.conf
regexp='^ include "mod_fastcgi.conf"'
insertafter='^# include "mod_fastcgi.conf"'
line=' include "mod_fastcgi.conf"'
state=present
# notify:
# - start lighttpd
- name: start lighttpd
command: /etc/init.d/lighttpd start
- name: add lighttpd to the default runlevel
command: /sbin/rc-update add lighttpd default
- name: install a default index.html file
template: src=files/lighttpd.j2
dest=/var/www/localhost/htdocs/index.html
owner=lighttpd
group=lighttpd
mode=0644
|