SSE-Lab/ansible/playbooks/roles/nextcloud_aio/tasks/nextcloud_docker_aio.yaml

31 lines
834 B
YAML

---
- name: Pull docker image
docker_image:
name: "nextcloud/all-in-one"
tag: "{{ nextcloud_docker_image_tag }}"
source: pull
- name: Create Master Container volume dir
file:
path: "{{ nextcloud_docker_mastercontainer_volume_dir }}"
state: directory
mode: "0766"
- 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