From 83d0a15588d1a2070217711c240caf027b6c4a83 Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Mon, 16 May 2016 14:54:26 -0400 Subject: [PATCH] bugfix for issue with trying to eval contains with non-string fixes ansible/ansible-modules-core#3502 --- lib/ansible/module_utils/netcfg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/netcfg.py b/lib/ansible/module_utils/netcfg.py index 68607f525c9..20a3d3e6819 100644 --- a/lib/ansible/module_utils/netcfg.py +++ b/lib/ansible/module_utils/netcfg.py @@ -382,7 +382,7 @@ class Conditional(object): return self.number(value) <= self.value def contains(self, value): - return self.value in value + return str(self.value) in value