diff options
Diffstat (limited to 'roles/nextcloud')
-rwxr-xr-x | roles/nextcloud/templates/nextcloud-occ.j2 | 4 | ||||
-rw-r--r-- | roles/nextcloud/templates/run-cron.sh.j2 | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/roles/nextcloud/templates/nextcloud-occ.j2 b/roles/nextcloud/templates/nextcloud-occ.j2 index 91977ccd..a79c5335 100755 --- a/roles/nextcloud/templates/nextcloud-occ.j2 +++ b/roles/nextcloud/templates/nextcloud-occ.j2 @@ -9,7 +9,9 @@ if [ -z "$INST_NAME" ]; then fi set -eu -export CONTAINER_RUNTIME_ENDPOINT="unix:///run/containerd/containerd.sock" +{% if kubernetes_cri_socket is defined %} +export CONTAINER_RUNTIME_ENDPOINT="{{ kubernetes_cri_socket }}" +{% endif %} pod_id=$(crictl pods -q --state ready --name "$INST_NAME-{{ ansible_nodename }}") if [ -z "$pod_id" ]; then echo "Pod not found"; exit 1; fi diff --git a/roles/nextcloud/templates/run-cron.sh.j2 b/roles/nextcloud/templates/run-cron.sh.j2 index a0c986ae..9936bad1 100644 --- a/roles/nextcloud/templates/run-cron.sh.j2 +++ b/roles/nextcloud/templates/run-cron.sh.j2 @@ -1,7 +1,8 @@ #!/bin/bash -## TODO: what about other container runtimes??? -export CONTAINER_RUNTIME_ENDPOINT=unix:///run/containerd/containerd.sock +{% if kubernetes_cri_socket is defined %} +export CONTAINER_RUNTIME_ENDPOINT="{{ kubernetes_cri_socket }}" +{% endif %} POD_NAME="{{ item }}-$(hostname)" POD_ID=$(crictl pods --name "$POD_NAME" --state ready -q) |