blob: 74f3240af875a74b63e57581c83c154c4bddb567 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
---
- name: create collabora-code config subdirectory
loop: "{{ collabora_code_instances | list }}"
file:
path: "{{ collabora_code_base_path }}/{{ item }}/config"
state: directory
mode: 0750
- name: generate configuration file
loop: "{{ collabora_code_instances | dict2items }}"
loop_control:
label: "{{ item.key }}"
template:
src: "config/loolwsd.{{ item.value.version }}.xml.j2"
dest: "{{ collabora_code_base_path }}/{{ item.key }}/config/loolwsd.xml"
- name: build custom image
loop: "{{ collabora_code_instances | dict2items }}"
loop_control:
label: "{{ item.key }}"
when: "'custom_image' in item.value"
include_tasks: custom-image.yml
- name: install pod manifest
loop: "{{ collabora_code_instances | dict2items }}"
loop_control:
label: "{{ item.key }}"
vars:
kubernetes_standalone_pod:
name: "collabora-code-{{ item.key }}"
spec: "{{ lookup('template', 'pod-spec.yml.j2') }}"
mode: "0600"
config_hash_items:
- path: "{{ collabora_code_base_path }}/{{ item.key }}/config/loolwsd.xml"
properties:
- checksum
include_role:
name: kubernetes/standalone/pod
- name: configure nginx vhost
loop: "{{ collabora_code_instances | dict2items }}"
loop_control:
label: "{{ item.key }}"
vars:
nginx_vhost:
name: "collabora-code-{{ item.key }}"
content: "{{ lookup('template', 'nginx-vhost.conf.j2') }}"
acme: true
hostnames:
- "{{ item.value.hostname }}"
include_role:
name: nginx/vhost
|