Nextcloud AIO

This commit is contained in:
Fabio Sinibaldi 2026-06-15 16:49:01 +02:00
parent 2d310dc3db
commit 84b509ec37
5 changed files with 50 additions and 28 deletions

View File

@ -0,0 +1,17 @@
---
externals:
children:
nextcloud:
hosts:
c-service.sse.cloud.isti.cnr.it
rup_tests:
hosts:
liquid:
ansible_host: 146.48.108.15
nextrup_copy_test:
ansible_host: 146.48.108.16
misc_tests:
hosts:
bigbrain:
ansible_host: 146.48.108.14

View File

@ -1,17 +1,8 @@
---
- name: Install Nextcloud AIO Docker
hosts: all
hosts: nextcloud
become: true
vars:
pip_install_packages:
- name: docker
docker_version: "=5:28.2.2-1~ubuntu.24.04~noble"
docker_users:
- fabio
- ansible
roles:
- geerlingguy.pip
- geerlingguy.docker
# - nextcloud_aio
- nextcloud_aio

View File

@ -0,0 +1,3 @@
nextcloud_docker_image_tag: latest
nextcloud_docker_skip_domain_validation: "true"
nextcloud_docker_mastercontainer_volume_dir: /usr/data/nextcloud_aio_mastercontainer

View File

@ -1,2 +0,0 @@
dependencies:
- role: docker

View File

@ -1,18 +1,31 @@
---
- name: Create volumes
debug:
msg:
- "TODO!!!"
- name: Pull docker image
docker_image:
name: "nextcloud/all-in-one"
tag: "{{ nextcloud_docker_image_tag }}"
source: pull
- name: Download compose file
become: true
become_user: docker
ansible.builtin.git:
repo: "https://gitea-s2i2s.isti.cnr.it/sinibaldi/SSE-Lab"
dest: SSE-Lab
- name: Create Master Container volume dir
file:
path: "{{ nextcloud_docker_mastercontainer_volume_dir }}"
state: directory
mode: "0766"
- name: create and start docker compose services
become: true
become_user: docker
community.docker.docker_compose_v2:
project_src: ~/SSE-Lab/dockerized/nextcloud-aio/compose.yaml
- name: Create container
docker_container:
name: nextcloud-aio-mastercontainer
image: nextcloud/all-in-one
ports:
- "8080:8080"
- "80:80"
- "8443:8443"
env:
APACHE_PORT: "11000"
APACHE_IP_BINDING: "0.0.0.0"
APACHE_ADDITIONAL_NETWORK: ""
SKIP_DOMAIN_VALIDATION: "{{ nextcloud_docker_skip_domain_validation }}"
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config
- /var/run/docker.sock:/var/run/docker.sock:ro
restart_policy : "always"
init : true