feat: add basic opencloud deployment
Signed-off-by: Bert-Jan Fikse <bert-jan@whatwedo.ch>
This commit is contained in:
parent
6fad15e7ed
commit
e7e4d5016d
3 changed files with 56 additions and 0 deletions
|
|
@ -1,3 +1,24 @@
|
||||||
#SPDX-License-Identifier: MIT-0
|
#SPDX-License-Identifier: MIT-0
|
||||||
---
|
---
|
||||||
# defaults file for opencloud
|
# defaults file for opencloud
|
||||||
|
|
||||||
|
# Base directory configuration (inherited from base role or defined here)
|
||||||
|
docker_compose_base_dir: /etc/docker/compose
|
||||||
|
docker_volume_base_dir: /srv/data
|
||||||
|
|
||||||
|
# OpenCloud-specific configuration
|
||||||
|
opencloud_service_name: opencloud
|
||||||
|
opencloud_docker_compose_dir: "{{ docker_compose_base_dir }}/{{ opencloud_service_name }}"
|
||||||
|
opencloud_docker_volume_dir: "{{ docker_volume_base_dir }}/{{ opencloud_service_name }}"
|
||||||
|
|
||||||
|
# Service configuration
|
||||||
|
opencloud_domain: "opencloud.local.test"
|
||||||
|
opencloud_image: "opencloudeu/opencloud:latest"
|
||||||
|
opencloud_port: 9200
|
||||||
|
opencloud_admin_password: "admin"
|
||||||
|
opencloud_log_level: "warn"
|
||||||
|
opencloud_extra_hosts: []
|
||||||
|
|
||||||
|
# Traefik configuration
|
||||||
|
opencloud_traefik_network: "proxy"
|
||||||
|
opencloud_use_ssl: true
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
#SPDX-License-Identifier: MIT-0
|
#SPDX-License-Identifier: MIT-0
|
||||||
---
|
---
|
||||||
# handlers file for opencloud
|
# handlers file for opencloud
|
||||||
|
|
||||||
|
- name: restart opencloud
|
||||||
|
community.docker.docker_compose_v2:
|
||||||
|
project_src: "{{ opencloud_docker_compose_dir }}"
|
||||||
|
state: restarted
|
||||||
|
|
@ -1,3 +1,33 @@
|
||||||
#SPDX-License-Identifier: MIT-0
|
#SPDX-License-Identifier: MIT-0
|
||||||
---
|
---
|
||||||
# tasks file for opencloud
|
# tasks file for opencloud
|
||||||
|
|
||||||
|
- name: Create docker compose directory
|
||||||
|
file:
|
||||||
|
path: "{{ opencloud_docker_compose_dir }}"
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: Create opencloud data directory
|
||||||
|
file:
|
||||||
|
path: "{{ opencloud_docker_volume_dir }}/data"
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: Create opencloud config directory
|
||||||
|
file:
|
||||||
|
path: "{{ opencloud_docker_volume_dir }}/config"
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: Create docker-compose file for opencloud
|
||||||
|
template:
|
||||||
|
src: docker-compose.yml.j2
|
||||||
|
dest: "{{ opencloud_docker_compose_dir }}/docker-compose.yml"
|
||||||
|
mode: '0644'
|
||||||
|
notify: restart opencloud
|
||||||
|
|
||||||
|
- name: Start opencloud container
|
||||||
|
community.docker.docker_compose_v2:
|
||||||
|
project_src: "{{ opencloud_docker_compose_dir }}"
|
||||||
|
state: present
|
||||||
Loading…
Add table
Add a link
Reference in a new issue