From 2319c6e33b6f3dd34b1bcd6e5a1ba8fc083d26f6 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Fri, 28 Feb 2025 00:03:25 +0900 Subject: [PATCH 1/2] Add license information to files for matrix-alertmanager-receiver Signed-off-by: Suguru Hirahara --- docs/configuring-playbook-alertmanager-receiver.md | 8 ++++++++ .../custom/matrix-alertmanager-receiver/defaults/main.yml | 5 +++++ .../custom/matrix-alertmanager-receiver/tasks/install.yml | 5 +++++ roles/custom/matrix-alertmanager-receiver/tasks/main.yml | 4 ++++ .../matrix-alertmanager-receiver/tasks/uninstall.yml | 4 ++++ .../tasks/validate_config.yml | 4 ++++ .../templates/config.yaml.j2.license | 4 ++++ .../matrix-alertmanager-receiver/templates/labels.j2 | 6 ++++++ .../matrix-alertmanager-receiver.service.j2.license | 3 +++ 9 files changed, 43 insertions(+) create mode 100644 roles/custom/matrix-alertmanager-receiver/templates/config.yaml.j2.license create mode 100644 roles/custom/matrix-alertmanager-receiver/templates/systemd/matrix-alertmanager-receiver.service.j2.license diff --git a/docs/configuring-playbook-alertmanager-receiver.md b/docs/configuring-playbook-alertmanager-receiver.md index eee2dd0a5..cd43c2c7e 100644 --- a/docs/configuring-playbook-alertmanager-receiver.md +++ b/docs/configuring-playbook-alertmanager-receiver.md @@ -1,3 +1,11 @@ + + # Setting up Prometheus Alertmanager integration via matrix-alertmanager-receiver (optional) The playbook can install and configure the [matrix-alertmanager-receiver](https://github.com/metio/matrix-alertmanager-receiver) service for you. It's a [client](https://prometheus.io/docs/alerting/latest/clients/) for Prometheus' [Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/), allowing you to deliver alerts to Matrix rooms. diff --git a/roles/custom/matrix-alertmanager-receiver/defaults/main.yml b/roles/custom/matrix-alertmanager-receiver/defaults/main.yml index 6209fe1b3..1b7763a37 100644 --- a/roles/custom/matrix-alertmanager-receiver/defaults/main.yml +++ b/roles/custom/matrix-alertmanager-receiver/defaults/main.yml @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev +# SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara +# +# SPDX-License-Identifier: AGPL-3.0-or-later + --- # matrix-alertmanager-receiver is a service which receives webhook payloads from Prometheus' Alertmanager and forwards them to a Matrix room. diff --git a/roles/custom/matrix-alertmanager-receiver/tasks/install.yml b/roles/custom/matrix-alertmanager-receiver/tasks/install.yml index 50bb44627..a710fcdf3 100644 --- a/roles/custom/matrix-alertmanager-receiver/tasks/install.yml +++ b/roles/custom/matrix-alertmanager-receiver/tasks/install.yml @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: 2024 David Mehren +# SPDX-FileCopyrightText: 2024 Slavi Pantaleev +# +# SPDX-License-Identifier: AGPL-3.0-or-later + --- - name: Ensure matrix-alertmanager-receiver paths exist diff --git a/roles/custom/matrix-alertmanager-receiver/tasks/main.yml b/roles/custom/matrix-alertmanager-receiver/tasks/main.yml index b6ff76aca..ac7500030 100644 --- a/roles/custom/matrix-alertmanager-receiver/tasks/main.yml +++ b/roles/custom/matrix-alertmanager-receiver/tasks/main.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 Slavi Pantaleev +# +# SPDX-License-Identifier: AGPL-3.0-or-later + --- - tags: diff --git a/roles/custom/matrix-alertmanager-receiver/tasks/uninstall.yml b/roles/custom/matrix-alertmanager-receiver/tasks/uninstall.yml index f0a82acbf..71b76298d 100644 --- a/roles/custom/matrix-alertmanager-receiver/tasks/uninstall.yml +++ b/roles/custom/matrix-alertmanager-receiver/tasks/uninstall.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 Slavi Pantaleev +# +# SPDX-License-Identifier: AGPL-3.0-or-later + --- - name: Check existence of matrix-alertmanager-receiver service diff --git a/roles/custom/matrix-alertmanager-receiver/tasks/validate_config.yml b/roles/custom/matrix-alertmanager-receiver/tasks/validate_config.yml index 34878b670..77ecdce2a 100644 --- a/roles/custom/matrix-alertmanager-receiver/tasks/validate_config.yml +++ b/roles/custom/matrix-alertmanager-receiver/tasks/validate_config.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 Slavi Pantaleev +# +# SPDX-License-Identifier: AGPL-3.0-or-later + --- - name: Fail if required matrix-alertmanager-receiver settings not defined ansible.builtin.fail: diff --git a/roles/custom/matrix-alertmanager-receiver/templates/config.yaml.j2.license b/roles/custom/matrix-alertmanager-receiver/templates/config.yaml.j2.license new file mode 100644 index 000000000..401253ee1 --- /dev/null +++ b/roles/custom/matrix-alertmanager-receiver/templates/config.yaml.j2.license @@ -0,0 +1,4 @@ +SPDX-FileCopyrightText: 2024 Slavi Pantaleev +SPDX-FileCopyrightText: 2024 Suguru Hirahara + +SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/roles/custom/matrix-alertmanager-receiver/templates/labels.j2 b/roles/custom/matrix-alertmanager-receiver/templates/labels.j2 index 8bf7d22b9..77dc78e8b 100644 --- a/roles/custom/matrix-alertmanager-receiver/templates/labels.j2 +++ b/roles/custom/matrix-alertmanager-receiver/templates/labels.j2 @@ -1,3 +1,9 @@ +{# +SPDX-FileCopyrightText: 2024 Slavi Pantaleev + +SPDX-License-Identifier: AGPL-3.0-or-later +#} + {% if matrix_alertmanager_receiver_container_labels_traefik_enabled %} traefik.enable=true diff --git a/roles/custom/matrix-alertmanager-receiver/templates/systemd/matrix-alertmanager-receiver.service.j2.license b/roles/custom/matrix-alertmanager-receiver/templates/systemd/matrix-alertmanager-receiver.service.j2.license new file mode 100644 index 000000000..e18b238ea --- /dev/null +++ b/roles/custom/matrix-alertmanager-receiver/templates/systemd/matrix-alertmanager-receiver.service.j2.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev + +SPDX-License-Identifier: AGPL-3.0-or-later From 195864980b2fdff32c485de0bc0113ed5aa9d793 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Fri, 28 Feb 2025 00:03:35 +0900 Subject: [PATCH 2/2] Add license information to files for appservice-double-puppet Signed-off-by: Suguru Hirahara --- docs/configuring-playbook-appservice-double-puppet.md | 7 +++++++ .../matrix-appservice-double-puppet/defaults/main.yml | 4 ++++ .../matrix-appservice-double-puppet/tasks/install.yml | 4 ++++ .../custom/matrix-appservice-double-puppet/tasks/main.yml | 4 ++++ .../matrix-appservice-double-puppet/tasks/uninstall.yml | 4 ++++ .../tasks/validate_config.yml | 4 ++++ .../templates/registration.yaml.j2 | 6 ++++++ 7 files changed, 33 insertions(+) diff --git a/docs/configuring-playbook-appservice-double-puppet.md b/docs/configuring-playbook-appservice-double-puppet.md index 41967f3fa..d2bac9d42 100644 --- a/docs/configuring-playbook-appservice-double-puppet.md +++ b/docs/configuring-playbook-appservice-double-puppet.md @@ -1,3 +1,10 @@ + + # Setting up Appservice Double Puppet (optional) The playbook can install and configure the Appservice Double Puppet service for you. It is a homeserver appservice through which bridges (and potentially other services) can impersonate any user on the homeserver. diff --git a/roles/custom/matrix-appservice-double-puppet/defaults/main.yml b/roles/custom/matrix-appservice-double-puppet/defaults/main.yml index a8a0c8e51..33907875d 100644 --- a/roles/custom/matrix-appservice-double-puppet/defaults/main.yml +++ b/roles/custom/matrix-appservice-double-puppet/defaults/main.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 Slavi Pantaleev +# +# SPDX-License-Identifier: AGPL-3.0-or-later + --- matrix_appservice_double_puppet_enabled: true diff --git a/roles/custom/matrix-appservice-double-puppet/tasks/install.yml b/roles/custom/matrix-appservice-double-puppet/tasks/install.yml index c0818477b..a0a427aae 100644 --- a/roles/custom/matrix-appservice-double-puppet/tasks/install.yml +++ b/roles/custom/matrix-appservice-double-puppet/tasks/install.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 Slavi Pantaleev +# +# SPDX-License-Identifier: AGPL-3.0-or-later + --- - name: Ensure matrix-appservice-double-puppet paths exist diff --git a/roles/custom/matrix-appservice-double-puppet/tasks/main.yml b/roles/custom/matrix-appservice-double-puppet/tasks/main.yml index c7860d03b..79e61c0eb 100644 --- a/roles/custom/matrix-appservice-double-puppet/tasks/main.yml +++ b/roles/custom/matrix-appservice-double-puppet/tasks/main.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 Suguru Hirahara +# +# SPDX-License-Identifier: AGPL-3.0-or-later + --- - tags: diff --git a/roles/custom/matrix-appservice-double-puppet/tasks/uninstall.yml b/roles/custom/matrix-appservice-double-puppet/tasks/uninstall.yml index cc22920cc..0fd5d561c 100644 --- a/roles/custom/matrix-appservice-double-puppet/tasks/uninstall.yml +++ b/roles/custom/matrix-appservice-double-puppet/tasks/uninstall.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 Slavi Pantaleev +# +# SPDX-License-Identifier: AGPL-3.0-or-later + --- - name: Ensure matrix-appservice-double-puppet paths don't exist diff --git a/roles/custom/matrix-appservice-double-puppet/tasks/validate_config.yml b/roles/custom/matrix-appservice-double-puppet/tasks/validate_config.yml index 0151b1db1..abe7b371b 100644 --- a/roles/custom/matrix-appservice-double-puppet/tasks/validate_config.yml +++ b/roles/custom/matrix-appservice-double-puppet/tasks/validate_config.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 Slavi Pantaleev +# +# SPDX-License-Identifier: AGPL-3.0-or-later + --- - name: Fail if required matrix-appservice-double-puppet settings not defined ansible.builtin.fail: diff --git a/roles/custom/matrix-appservice-double-puppet/templates/registration.yaml.j2 b/roles/custom/matrix-appservice-double-puppet/templates/registration.yaml.j2 index e3d19ee1f..7702b2585 100644 --- a/roles/custom/matrix-appservice-double-puppet/templates/registration.yaml.j2 +++ b/roles/custom/matrix-appservice-double-puppet/templates/registration.yaml.j2 @@ -1,3 +1,9 @@ +{# +SPDX-FileCopyrightText: 2024 Slavi Pantaleev + +SPDX-License-Identifier: AGPL-3.0-or-later +#} + # The ID doesn't really matter, put whatever you want. id: {{ matrix_appservice_double_puppet_registration_id | to_json }} # The URL is intentionally left empty (null), as the homeserver shouldn't