summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-05-17 22:13:21 +0200
committerChristian Pointner <equinox@spreadspace.org>2020-05-17 22:13:21 +0200
commit839738d06b65fc31edcad3406adc278069dd5edc (patch)
tree9f4c0776cc0930ced9f5ee5165c136a81458c473 /roles
parentkubernetes/standalone: fix portmap and hostIP handling (diff)
switch to improved portmapping for all other k8s standalone apps
Diffstat (limited to 'roles')
-rw-r--r--roles/apps/collabora/code/templates/pod.yml.j21
-rw-r--r--roles/apps/etherpad-lite/templates/pod-with-mariadb.yml.j21
-rw-r--r--roles/apps/nextcloud/tasks/main.yml5
-rw-r--r--roles/apps/nextcloud/templates/pod-with-mariadb.yml.j21
-rw-r--r--roles/nginx/base/defaults/main.yml2
-rw-r--r--roles/nginx/base/tasks/main.yml9
6 files changed, 17 insertions, 2 deletions
diff --git a/roles/apps/collabora/code/templates/pod.yml.j2 b/roles/apps/collabora/code/templates/pod.yml.j2
index ee4651a1..8ed092ac 100644
--- a/roles/apps/collabora/code/templates/pod.yml.j2
+++ b/roles/apps/collabora/code/templates/pod.yml.j2
@@ -26,6 +26,7 @@ spec:
ports:
- containerPort: 9980
hostPort: {{ item.value.port }}
+ hostIP: 127.0.0.1
volumes:
- name: config
hostPath:
diff --git a/roles/apps/etherpad-lite/templates/pod-with-mariadb.yml.j2 b/roles/apps/etherpad-lite/templates/pod-with-mariadb.yml.j2
index a4acdd21..9391290f 100644
--- a/roles/apps/etherpad-lite/templates/pod-with-mariadb.yml.j2
+++ b/roles/apps/etherpad-lite/templates/pod-with-mariadb.yml.j2
@@ -22,6 +22,7 @@ spec:
ports:
- containerPort: 9001
hostPort: {{ item.value.port }}
+ hostIP: 127.0.0.1
- name: database
image: "mariadb:{{ item.value.database.version }}"
securityContext:
diff --git a/roles/apps/nextcloud/tasks/main.yml b/roles/apps/nextcloud/tasks/main.yml
index 7d52be32..68e9dc78 100644
--- a/roles/apps/nextcloud/tasks/main.yml
+++ b/roles/apps/nextcloud/tasks/main.yml
@@ -12,7 +12,7 @@
- name: create zfs volumes for instances
loop: "{{ nextcloud_instances | dict2items }}"
loop_control:
- label: "{{ item.key }} ({{ item.value.quota }})"
+ label: "{{ item.key }} ({{ item.value.quota | default('-') }})"
zfs:
name: "{{ nextcloud_zfs.pool }}/{{ nextcloud_zfs.name }}/{{ item.key }}"
state: present
@@ -174,7 +174,8 @@
prompt: |
************* {{ item.key }} is a new instance
**
- ** Please run the following commands to finalize the installation
+ ** Go to https://{{ item.value.hostnames[0] }} and finalize the
+ ** installation. After that run the following commands:
**
** $ nextcloud-occ {{ item.key }} db:add-missing-indices
** $ nextcloud-occ {{ item.key }} db:convert-filecache-bigint
diff --git a/roles/apps/nextcloud/templates/pod-with-mariadb.yml.j2 b/roles/apps/nextcloud/templates/pod-with-mariadb.yml.j2
index dfef3810..72f8cb7a 100644
--- a/roles/apps/nextcloud/templates/pod-with-mariadb.yml.j2
+++ b/roles/apps/nextcloud/templates/pod-with-mariadb.yml.j2
@@ -41,6 +41,7 @@ spec:
ports:
- containerPort: 8080
hostPort: {{ item.value.port }}
+ hostIP: 127.0.0.1
- name: database
image: "mariadb:{{ item.value.database.version }}"
args:
diff --git a/roles/nginx/base/defaults/main.yml b/roles/nginx/base/defaults/main.yml
index 9dd53cdf..79c79b49 100644
--- a/roles/nginx/base/defaults/main.yml
+++ b/roles/nginx/base/defaults/main.yml
@@ -14,3 +14,5 @@ nginx_snippets:
nginx_dhparam_size: 2048
nginx_stream_module: no
+
+# nginx_server_names_hash_bucket_size: 64
diff --git a/roles/nginx/base/tasks/main.yml b/roles/nginx/base/tasks/main.yml
index b0e7df5b..572b1513 100644
--- a/roles/nginx/base/tasks/main.yml
+++ b/roles/nginx/base/tasks/main.yml
@@ -33,3 +33,12 @@
- name: install and setup stream module
when: nginx_stream_module
import_tasks: stream.yml
+
+- name: configure server_names_hash_bucket_size
+ when: nginx_server_names_hash_bucket_size is defined
+ lineinfile:
+ regexp: "^(\\s*)#?\\s*server_names_hash_bucket_size\\s"
+ line: "\\1server_names_hash_bucket_size {{ nginx_server_names_hash_bucket_size }};"
+ dest: /etc/nginx/nginx.conf
+ backrefs: yes
+ notify: restart nginx