From 015a08524f09292214f3a14391ce39783857f2c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Quatremain?= Date: Wed, 9 Oct 2024 16:06:54 +0200 Subject: [PATCH] Update parameter type in quay_notification --- plugins/modules/quay_notification.py | 8 ++++---- tests/integration/targets/quay_tag/defaults/main.yml | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/modules/quay_notification.py b/plugins/modules/quay_notification.py index f3ffd41..4450fa3 100644 --- a/plugins/modules/quay_notification.py +++ b/plugins/modules/quay_notification.py @@ -107,7 +107,7 @@ template: description: - JSON data for the body content of the webhook POST method. - type: str + type: jsonarg room_id: description: - Chat room ID required for the HipChat notification method. @@ -240,7 +240,7 @@ method: webhook config: url: https://webhook.example.com/webhook/12345 - template: "{{ lookup('file', 'post.json') | string }}" + template: "{{ lookup('ansible.builtin.file', 'post.json') }}" state: present quay_host: https://quay.example.com quay_token: vgfH9zH5q6eV16Con7SvDQYSr0KPYQimMHVehZv7 @@ -256,7 +256,7 @@ method: webhook config: url: https://webhook.example.com/webhook/12345 - template: "{{ lookup('file', 'post.json') | string }}" + template: "{{ lookup('ansible.builtin.file', 'post.json') }}" state: present quay_host: https://quay.example.com quay_token: vgfH9zH5q6eV16Con7SvDQYSr0KPYQimMHVehZv7 @@ -369,7 +369,7 @@ def main(): # Slack and webhook notification url=dict(), # webhook notification - template=dict(), + template=dict(type="jsonarg"), # HipChat notification room_id=dict(), notification_token=dict(no_log=True), diff --git a/tests/integration/targets/quay_tag/defaults/main.yml b/tests/integration/targets/quay_tag/defaults/main.yml index 359055e..268e26a 100644 --- a/tests/integration/targets/quay_tag/defaults/main.yml +++ b/tests/integration/targets/quay_tag/defaults/main.yml @@ -1,4 +1,5 @@ --- fake_image: quay.io/prometheus/busybox:latest -expiration: "{{ lookup('pipe', 'date -d now+1year +%Y%m%d0132.12') }}" +expiration: "{{ lookup('ansible.builtin.pipe', + 'date -d now+1year +%Y%m%d0132.12') }}" ...