blob: 84efec5c4f577c9b03e165b9f4334cf8562ca031 (
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/{{ item.value.version | collabora_code_loolvcool | ternary('lool', 'cool') }}wsd.{{ item.value.version }}.xml.j2"
dest: "{{ collabora_code_base_path }}/{{ item.key }}/config/{{ item.value.version | collabora_code_loolvcool | ternary('lool', 'cool') }}wsd.xml"
- name: remove legacy configuration file
loop: "{{ collabora_code_instances | dict2items }}"
loop_control:
label: "{{ item.key }}"
file:
path: "{{ collabora_code_base_path }}/{{ item.key }}/config/{{ item.value.version | collabora_code_loolvcool | ternary('cool', 'lool') }}wsd.xml"
state: absent
- 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/{{ item.value.version | collabora_code_loolvcool | ternary('lool', 'cool') }}wsd.xml"
properties:
- checksum
include_role:
name: kubernetes/standalone/pod
- name: install nginx vhost config
loop: "{{ collabora_code_instances | dict2items }}"
loop_control:
label: "{{ item.key }}"
include_tasks: nginx-vhost.yml
|