forked from jakub/ansible
test
This commit is contained in:
@@ -0,0 +1,74 @@
|
|||||||
|
services:
|
||||||
|
nextcloud:
|
||||||
|
image: "nextcloud:{{ nextcloud_version }}-apache"
|
||||||
|
container_name: nextcloud
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- cloud
|
||||||
|
depends_on:
|
||||||
|
- nextclouddb
|
||||||
|
- redis
|
||||||
|
ports:
|
||||||
|
- 8080:80
|
||||||
|
volumes:
|
||||||
|
- /data/compose/nextcloud/config:/var/www/html/config
|
||||||
|
- /data/compose/nextcloud/data:/var/www/html/data
|
||||||
|
- /data/compose/nextcloud/custom_apps:/var/www/html/custom_apps
|
||||||
|
environment:
|
||||||
|
- TZ=Europe/Prague
|
||||||
|
- MYSQL_DATABASE=nextcloud
|
||||||
|
- MYSQL_USER=nextcloud
|
||||||
|
- MYSQL_PASSWORD=dbpassword
|
||||||
|
- MYSQL_HOST=nextclouddb
|
||||||
|
- REDIS_HOST=redis
|
||||||
|
- NEXTCLOUD_ADMIN_USER=root
|
||||||
|
- NEXTCLOUD_ADMIN_PASSWORD=1234SilneHeslo.-.
|
||||||
|
- PHP_MEMORY_LIMIT=2048M
|
||||||
|
|
||||||
|
|
||||||
|
nextclouddb:
|
||||||
|
image: mariadb
|
||||||
|
container_name: nextcloud-db
|
||||||
|
restart: unless-stopped
|
||||||
|
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
|
||||||
|
networks:
|
||||||
|
- cloud
|
||||||
|
volumes:
|
||||||
|
- /data/compose/nextcloud/nextclouddb:/var/lib/mysql
|
||||||
|
environment:
|
||||||
|
- TZ=Europe/Prague
|
||||||
|
- MYSQL_RANDOM_ROOT_PASSWORD=true
|
||||||
|
- MYSQL_DATABASE=nextcloud
|
||||||
|
- MYSQL_USER=nextcloud
|
||||||
|
- MYSQL_PASSWORD=dbpassword
|
||||||
|
- MARIADB_AUTO_UPGRADE=1
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:alpine
|
||||||
|
container_name: redis
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- cloud
|
||||||
|
volumes:
|
||||||
|
- /data/compose/nextcloud/redis:/data
|
||||||
|
|
||||||
|
#collabora:
|
||||||
|
# image: collabora/code
|
||||||
|
# container_name: collabora
|
||||||
|
# restart: unless-stopped
|
||||||
|
# networks:
|
||||||
|
# - cloud
|
||||||
|
# environment:
|
||||||
|
# - TZ=Europe/Prague
|
||||||
|
# - password=password
|
||||||
|
# - username=nextcloud
|
||||||
|
# - domain=cloud.martinfencl.eu
|
||||||
|
# - extra_params=--o:ssl.enable=false --o:ssl.termination=true
|
||||||
|
# - aliasgroup1=https://cloud.martinfencl.eu:443,https://collabora.martinfencl.eu:443
|
||||||
|
# - dictionaries=de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru cs_CZ
|
||||||
|
# ports:
|
||||||
|
# - 9980:9980
|
||||||
|
|
||||||
|
networks:
|
||||||
|
cloud:
|
||||||
|
driver: bridge
|
||||||
@@ -15,6 +15,8 @@
|
|||||||
vm_use_sudo: "{{ use_sudo | default(false) | bool }}"
|
vm_use_sudo: "{{ use_sudo | default(false) | bool }}"
|
||||||
debug_level: "{{ DEBUG | default(0) | int }}"
|
debug_level: "{{ DEBUG | default(0) | int }}"
|
||||||
retry_count: "{{ RETRIES | default(25) | int }}"
|
retry_count: "{{ RETRIES | default(25) | int }}"
|
||||||
|
nextcloud_version: >-
|
||||||
|
{{ NEXTCLOUD_VERSION | default('') | string | trim }}
|
||||||
|
|
||||||
# Docker Compose configuration.
|
# Docker Compose configuration.
|
||||||
nextcloud_project: "nextcloud-collabora"
|
nextcloud_project: "nextcloud-collabora"
|
||||||
@@ -22,7 +24,7 @@
|
|||||||
|
|
||||||
# Compose file stored in Git.
|
# Compose file stored in Git.
|
||||||
nextcloud_compose_local_file: >-
|
nextcloud_compose_local_file: >-
|
||||||
{{ playbook_dir }}/../docker-compose/docker-compose-nextcloud.yml
|
{{ playbook_dir }}/../docker-compose/docker-compose-nextcloud.yml.j2
|
||||||
|
|
||||||
# Compose file location on the Nextcloud VM.
|
# Compose file location on the Nextcloud VM.
|
||||||
nextcloud_compose_file: >-
|
nextcloud_compose_file: >-
|
||||||
@@ -763,6 +765,16 @@
|
|||||||
echo "Post-upgrade checks completed successfully"
|
echo "Post-upgrade checks completed successfully"
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
|
- name: Validate requested Nextcloud version
|
||||||
|
ansible.builtin.assert:
|
||||||
|
that:
|
||||||
|
- nextcloud_version | length > 0
|
||||||
|
- 'nextcloud_version is match("^[0-9]+[.][0-9]+[.][0-9]+$")'
|
||||||
|
fail_msg: >-
|
||||||
|
NEXTCLOUD_VERSION is required and must have format X.Y.Z,
|
||||||
|
for example 34.0.3.
|
||||||
|
quiet: true
|
||||||
|
|
||||||
- name: Validate VM connection variables
|
- name: Validate VM connection variables
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
that:
|
that:
|
||||||
@@ -822,8 +834,8 @@
|
|||||||
|
|
||||||
- name: Nextcloud | Synchronize Compose file to VM
|
- name: Nextcloud | Synchronize Compose file to VM
|
||||||
block:
|
block:
|
||||||
- name: Nextcloud | Stage Compose file on Proxmox host
|
- name: Nextcloud | Render Compose file on Proxmox host
|
||||||
ansible.builtin.copy:
|
ansible.builtin.template:
|
||||||
src: "{{ nextcloud_compose_local_file }}"
|
src: "{{ nextcloud_compose_local_file }}"
|
||||||
dest: "{{ nextcloud_compose_controller_staging_file }}"
|
dest: "{{ nextcloud_compose_controller_staging_file }}"
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
|
|||||||
Reference in New Issue
Block a user