From 66eec42f53462e931030b26011054acdcb1febcc Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Fri, 21 Sep 2018 18:30:31 +0200 Subject: [PATCH] Fix calling deprecate with correct arguments (#44726) This fixes #44702 --- lib/ansible/module_utils/basic.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index 98fd25f55d7..2a6c26b2d3b 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -2327,6 +2327,8 @@ class AnsibleModule(object): for d in kwargs['deprecations']: if isinstance(d, SEQUENCETYPE) and len(d) == 2: self.deprecate(d[0], version=d[1]) + elif isinstance(d, Mapping): + self.deprecate(d['msg'], version=d.get('version', None)) else: self.deprecate(d) else: