From b97c8ce8e7b784c7410c825bbf8c81c4c9487b3c Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Tue, 5 Apr 2016 22:44:07 -0400 Subject: [PATCH] bugfix netcfg return config as str fixes issue where netcfg would return out of order configuration --- 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 0c2f57880b1..15011865df5 100644 --- a/lib/ansible/module_utils/netcfg.py +++ b/lib/ansible/module_utils/netcfg.py @@ -108,7 +108,7 @@ class NetworkConfig(object): return self._config def __str__(self): - config = dict() + config = collections.OrderedDict() for item in self._config: self.expand(item, config) return '\n'.join(self.flatten(config))