50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
- name: Install packages
|
|
package:
|
|
name:
|
|
- tar # for unpacking the archive
|
|
- php-pdo_sqlite
|
|
- php-ctype
|
|
- php-dom
|
|
- php-gd
|
|
- php-json
|
|
- php-mbstring
|
|
- php-openssl
|
|
- php-session
|
|
- php-simplexml
|
|
- php-xml
|
|
- php-zip
|
|
notify: restart php-fpm
|
|
|
|
- name: Create kanboard directory
|
|
file:
|
|
path: /srv/http/kanboard
|
|
state: directory
|
|
owner: nginx
|
|
group: nginx
|
|
|
|
- name: Check if kanboard should be upgraded
|
|
lineinfile:
|
|
path: /srv/http/kanboard/app/constants.php
|
|
search_string: 'v{{ kanboard_version }}'
|
|
state: absent
|
|
check_mode: true
|
|
changed_when: false
|
|
register: is_current
|
|
|
|
- name: Install or upgrade kanboard
|
|
when: 'is_current.found|default(0) == 0'
|
|
unarchive:
|
|
remote_src: true
|
|
src: 'https://github.com/kanboard/kanboard/archive/refs/tags/v{{ kanboard_version }}.tar.gz'
|
|
extra_opts:
|
|
- '--strip-components=1'
|
|
dest: /srv/http/kanboard
|
|
owner: nginx
|
|
group: nginx
|
|
|
|
- name: Create nginx site
|
|
template:
|
|
dest: /etc/nginx/http.d/kanboard.conf
|
|
src: nginx.conf.j2
|
|
notify: reload nginx
|