2022-04-30 06:54:00 +00:00
|
|
|
# Sets up an instance of Kanboard from top to bottom
|
|
|
|
---
|
|
|
|
- hosts: leftcoastlab
|
|
|
|
become: yes
|
|
|
|
vars:
|
|
|
|
PRE: kanboard
|
|
|
|
DATA_VOLUME: "{{PRE}}-data-volume"
|
|
|
|
PLUGINS_VOLUME: "{{PRE}}-plugins-volume"
|
|
|
|
SSL_VOLUME: "{{PRE}}-ssl-volume"
|
|
|
|
tasks:
|
|
|
|
- name: Include Vars
|
|
|
|
include_vars:
|
|
|
|
dir: ../vars
|
|
|
|
|
|
|
|
- name: Ensure Data volume exists
|
|
|
|
community.docker.docker_volume:
|
|
|
|
name: "{{DATA_VOLUME}}"
|
|
|
|
|
|
|
|
- name: Ensure Plugins Volume exists
|
|
|
|
community.docker.docker_volume:
|
|
|
|
name: "{{PLUGINS_VOLUME}}"
|
|
|
|
|
|
|
|
- name: Ensure SSL Volume exists
|
|
|
|
community.docker.docker_volume:
|
|
|
|
name: "{{SSL_VOLUME}}"
|
|
|
|
|
|
|
|
- name: Ensure Docker service is active
|
|
|
|
community.docker.docker_container:
|
|
|
|
name: kanboard
|
|
|
|
image: kanboard/kanboard:latest
|
|
|
|
pull: yes
|
|
|
|
restart_policy: always
|
|
|
|
recreate: yes
|
|
|
|
ports:
|
|
|
|
- "{{ KANBOARD_PORT }}:80"
|
|
|
|
- "{{ KANBOARD_PORT_SSL }}:443"
|
|
|
|
volumes:
|
|
|
|
- "{{DATA_VOLUME}}:/var/www/app/data"
|
|
|
|
- "{{PLUGINS_VOLUME}}:/var/www/app/plugins"
|
|
|
|
- "{{SSL_VOLUME}}:/etc/nginx/ssl"
|
|
|
|
|
2022-05-01 04:55:05 +00:00
|
|
|
- name: Create Nginx Config for service
|
|
|
|
template:
|
|
|
|
dest: /etc/nginx/sites-available/todo.lablad
|
|
|
|
src: ../templates/proxy.conf.j2
|
|
|
|
notify:
|
|
|
|
- restart-nginx
|
|
|
|
vars:
|
|
|
|
SERVER_NAME: todo.lablad
|
|
|
|
PORT: KANBOARD_PORT
|
|
|
|
|
|
|
|
- name: Restart Nginx
|
|
|
|
service:
|
|
|
|
name: nginx
|
|
|
|
state: restarted
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-30 06:54:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|