46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
# 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"
|
|
|
|
|
|
|
|
|
|
|