Switch to using an external Ntfy role

The newly extracted role also has native Traefik support,
so we no longer need to rely on `matrix-nginx-proxy` for
reverse-proxying to Ntfy.

The new role uses port `80` inside the container (not `8080`, like
before), because that's the default assumption of the officially
published container image. Using a custom port (like `8080`), means the
default healthcheck command (which hardcodes port `80`) doesn't work.
Instead of fiddling to override the healthcheck command, we've decided
to stick to the default port instead. This only affects the
inside-the-container port, not any external ports.

The new role also supports adding the network ranges of the container's
multiple additional networks as "exempt hosts". Previously, only one
network's address range was added to "exempt hosts".
This commit is contained in:
Slavi Pantaleev
2023-02-17 09:54:33 +02:00
parent 38c4e464c1
commit 964aa0e84d
17 changed files with 78 additions and 258 deletions

View File

@ -11,3 +11,6 @@ matrix_playbook_migration_matrix_backup_borg_migration_validation_enabled: true
# Controls if (`matrix_grafana` -> `grafana`) validation will run.
matrix_playbook_migration_matrix_grafana_migration_validation_enabled: true
# Controls if (`matrix_ntfy` -> `ntfy`) validation will run.
matrix_playbook_migration_matrix_ntfy_migration_validation_enabled: true

View File

@ -82,7 +82,7 @@
when: "matrix_playbook_migration_matrix_prometheus_postgres_exporter_migration_vars | length > 0"
- when: matrix_playbook_migration_matrix_backup_borg_migration_validation_enabled | bool
block:
block:ntfy
- ansible.builtin.set_fact:
matrix_playbook_migration_backup_borg_migration_vars: |-
{{ vars | dict2items | selectattr('key', 'match', 'matrix_backup_borg_.*') | list | items2dict }}
@ -110,3 +110,18 @@
Please change your configuration (vars.yml) to rename all variables (`matrix_grafana_` -> `grafana_`).
We found usage of the following variables: {{ matrix_playbook_migration_grafana_migration_vars.keys() | join(', ') }}
when: "matrix_playbook_migration_grafana_migration_vars | length > 0"
- when: matrix_playbook_migration_matrix_ntfy_migration_validation_enabled | bool
block:
- ansible.builtin.set_fact:
matrix_playbook_migration_ntfy_migration_vars: |-
{{ vars | dict2items | selectattr('key', 'match', 'matrix_ntfy_.*') | list | items2dict }}
- name: (Deprecation) Catch and report matrix_ntfy variables
ansible.builtin.fail:
msg: >-
The matrix-ntfy role that used to be part of this playbook has been replaced by https://gitlab.com/etke.cc/roles/ntfy.
The new role is compatible with the old one, but uses different names for its variables.
Please change your configuration (vars.yml) to rename all variables (`matrix_ntfy_` -> `ntfy_`).
We found usage of the following variables: {{ matrix_playbook_migration_ntfy_migration_vars.keys() | join(', ') }}
when: "matrix_playbook_migration_ntfy_migration_vars | length > 0"