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']),