From 08eb51c87eea2ea1e58757d480c14c13cde6395d Mon Sep 17 00:00:00 2001 From: Gerik Bonaert Date: Fri, 3 Jun 2016 22:02:58 +0200 Subject: [PATCH] Define 'type' in argument_spec of openvswitch_port (#2355) The external_ids 'type' was not defined in the argument spec of openvswitch_port. This lead 'external_ids' to be converted to a string, when the value was not defined. Further down the code this was leading to an exception in some cases. By defining the type all is right. --- lib/ansible/modules/extras/network/openvswitch_port.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/network/openvswitch_port.py b/lib/ansible/modules/extras/network/openvswitch_port.py index 69e64ea8f9..3ce6f7f2f1 100644 --- a/lib/ansible/modules/extras/network/openvswitch_port.py +++ b/lib/ansible/modules/extras/network/openvswitch_port.py @@ -238,7 +238,7 @@ def main(): 'state': {'default': 'present', 'choices': ['present', 'absent']}, 'timeout': {'default': 5, 'type': 'int'}, 'set': {'required': False, 'default': None}, - 'external_ids': {'default': {}, 'required': False}, + 'external_ids': {'default': {}, 'required': False, 'type': 'dict'}, }, supports_check_mode=True, )