From ce33ca7ccb0aa1d8be052f4452d6c092b5ee7fc4 Mon Sep 17 00:00:00 2001 From: Michael Rennecke Date: Thu, 14 May 2020 21:44:26 +0200 Subject: [PATCH] add simple nextcloud role --- roles/nextcloud/defaults/main.yaml | 3 +++ roles/nextcloud/tasks/main.yaml | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 roles/nextcloud/defaults/main.yaml create mode 100644 roles/nextcloud/tasks/main.yaml diff --git a/roles/nextcloud/defaults/main.yaml b/roles/nextcloud/defaults/main.yaml new file mode 100644 index 0000000..e857551 --- /dev/null +++ b/roles/nextcloud/defaults/main.yaml @@ -0,0 +1,3 @@ + +nextcloud_data: /srv/nextcloud.0rpheus.net/html/ +nextcloud_version: 16 \ No newline at end of file diff --git a/roles/nextcloud/tasks/main.yaml b/roles/nextcloud/tasks/main.yaml new file mode 100644 index 0000000..0e726ef --- /dev/null +++ b/roles/nextcloud/tasks/main.yaml @@ -0,0 +1,19 @@ +--- + + - name: nextcloud data + file: + path: "{{ nextcloud_data }}" + state: directory + recurse: yes + + + - name: nextcloud container + docker_container: + name: nextcloud.0rpheus.net + image: "nextcloud:{{ nextcloud_version }}" + pull: yes + restart_policy: always + ports: + - 127.0.0.1:2090:80 + volumes: + - "{{ nextcloud_data }}:/var/www/html/" \ No newline at end of file