67 lines
1.3 KiB
YAML

---
- name: install packages
apk:
name: "{{ install_packages }}"
state: latest
# with_items: "{{ install_packages }}"
- name: symlink /usr/bin/php
file:
src: /usr/bin/php82
dest: /usr/bin/php
state: link
- name: download grav
get_url:
url: https://getgrav.org/download/core/grav-admin/1.7.48
dest: /var/www/localhost/grav-cms.zip
- name: extract grav
unarchive:
src: /var/www/localhost/grav-cms.zip
dest: /var/www/localhost
remote_src: yes
owner: lighttpd
group: lighttpd
mode: 0750
- name: remove old htdocs
file:
path: /var/www/localhost/htdocs
state: absent
- name: link to htdocs
file:
src: /var/www/localhost/grav-admin
dest: /var/www/localhost/htdocs
state: link
- name: install lighttpd config
copy:
src: lighttpd.conf
dest: /etc/lighttpd/lighttpd.conf
- name: install grav config
copy:
src: lighttpd-grav.conf
dest: /etc/lighttpd/grav.conf
- name: install php-cgi config
copy:
src: lighttpd-php-cgi.conf
dest: /etc/lighttpd/php-cgi.conf
- name: add update scripts
copy:
src: update-grav
dest: /etc/periodic/daily/update-grav
owner: root
group: root
mode: 0750
- name: restart lighttpd
service:
name: lighttpd
state: restarted
enabled: true