From 91d3857c36bf966fe35b999d624ca32e39ea4e96 Mon Sep 17 00:00:00 2001 From: joaocpinto Date: Thu, 29 Nov 2018 12:30:59 +0000 Subject: [PATCH] Cast int for expire field to avoid call failure to sensu API (#33239) (cherry picked from commit bbab4c1b496f3b9fa07b7121adebbbe0cc8772b6) * Cast int for expire field to avoid call failure to sensu API (#33239) * Add changelog --- changelogs/fragments/33239-sensu-expire-cast-int.yaml | 2 ++ lib/ansible/modules/monitoring/sensu_silence.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/33239-sensu-expire-cast-int.yaml diff --git a/changelogs/fragments/33239-sensu-expire-cast-int.yaml b/changelogs/fragments/33239-sensu-expire-cast-int.yaml new file mode 100644 index 00000000000..2c1200b7ade --- /dev/null +++ b/changelogs/fragments/33239-sensu-expire-cast-int.yaml @@ -0,0 +1,2 @@ +bugfixes: +- sensu_silence - Cast int for expire field to avoid call failure to sensu API. diff --git a/lib/ansible/modules/monitoring/sensu_silence.py b/lib/ansible/modules/monitoring/sensu_silence.py index 1e682d9be8f..05f77a17c0a 100644 --- a/lib/ansible/modules/monitoring/sensu_silence.py +++ b/lib/ansible/modules/monitoring/sensu_silence.py @@ -259,7 +259,7 @@ def main(): argument_spec=dict( check=dict(required=False), creator=dict(required=False), - expire=dict(required=False), + expire=dict(type='int', required=False), expire_on_resolve=dict(type='bool', required=False), reason=dict(required=False), state=dict(default='present', choices=['present', 'absent']),