mirror of
https://github.com/famedly/ansible-collection-matrix
synced 2024-12-13 20:52:28 +00:00
23ce96e385
The config files are now written to the app dir, not the version subdir. They are still linked to the version subdir though. Additionally, the container volumes for the config files are autogenerated now
45 lines
1.4 KiB
YAML
45 lines
1.4 KiB
YAML
---
|
|
- name: Create riot directory
|
|
file:
|
|
dest: "{{ riot_webapp_dir }}"
|
|
state: directory
|
|
|
|
- name: Download and install riot web app
|
|
import_tasks: download.yml
|
|
when: riot_deployment_method == "webroot"
|
|
|
|
- name: Write main configuration
|
|
copy:
|
|
content: "{{ riot_config | to_nice_json }}"
|
|
dest: "{{ riot_webapp_dir }}/config.json"
|
|
|
|
- name: Write domain specific configurations
|
|
copy:
|
|
content: "{{ item.config | to_nice_json }}"
|
|
dest: "{{ riot_webapp_dir }}/config.{{ item.domain }}.json"
|
|
loop: "{{ riot_domain_configs }}"
|
|
|
|
- name: Link main configuration
|
|
file:
|
|
src: "{{ riot_webapp_dir }}/config.json"
|
|
dest: "{{ riot_webapp_dir }}/riot-v{{ riot_version }}/config.json"
|
|
state: link
|
|
when: riot_deployment_method == "webroot"
|
|
|
|
- name: Link domain specific configurations
|
|
file:
|
|
src: "{{ riot_webapp_dir }}/config.{{ item.domain }}.json"
|
|
dest: "{{ riot_webapp_dir }}/riot-v{{ riot_version }}/config.{{ item.domain }}.json"
|
|
state: link
|
|
loop: "{{ riot_domain_configs }}"
|
|
when: riot_deployment_method == "webroot"
|
|
|
|
- name: Deploy docker container
|
|
docker_container:
|
|
name: "riot-web"
|
|
image: "docker.io/vectorim/riot-web:v{{ riot_version }}"
|
|
ports: "{{ riot_docker_ports }}"
|
|
labels: "{{ riot_docker_labels }}"
|
|
restart_policy: unless-stopped
|
|
volumes: "{{ riot_docker_volumes }}"
|
|
when: riot_deployment_method == "docker"
|