diff options
Diffstat (limited to 'roles/apps/nextcloud/tasks/main.yml')
-rw-r--r-- | roles/apps/nextcloud/tasks/main.yml | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/roles/apps/nextcloud/tasks/main.yml b/roles/apps/nextcloud/tasks/main.yml index b08ce2d0..d2ed558a 100644 --- a/roles/apps/nextcloud/tasks/main.yml +++ b/roles/apps/nextcloud/tasks/main.yml @@ -102,14 +102,24 @@ when: "'custom_image' in item.value" include_tasks: custom-image.yml -- name: generate pod manifests +- name: install pod manifest loop: "{{ nextcloud_instances | dict2items }}" loop_control: label: "{{ item.key }}" - template: - src: "pod-with-{{ item.value.database.type }}.yml.j2" - dest: "/etc/kubernetes/manifests/nextcloud-{{ item.key }}.yml" - mode: 0600 + vars: + kubernetes_standalone_pod: + name: "nextcloud-{{ item.key }}" + spec: "{{ lookup('template', 'pod-spec-with-{{ item.value.database.type }}.yml.j2') }}" + mode: 0600 + config_hash_items: + - path: "{{ nextcloud_base_path }}/{{ item.key }}/config/apache-site.conf" + properties: + - checksum + - path: "{{ nextcloud_base_path }}/{{ item.key }}/config/ports.conf" + properties: + - checksum + include_role: + name: kubernetes/standalone/pod - name: install cron trigger script @@ -141,8 +151,8 @@ - name: configure nginx vhost loop: "{{ nextcloud_instances | dict2items }}" - include_role: - name: nginx/vhost + loop_control: + label: "{{ item.key }}" vars: nginx_vhost: name: "nextcloud-{{ item.key }}" @@ -156,6 +166,8 @@ replacement: "https://$host/" - redirect: "http://$host:8080/" replacement: "https://$host/" + include_role: + name: nginx/vhost - name: install management scripts |