From 2560c4dda3fd7a06fc5406389ee9823ec06f44d2 Mon Sep 17 00:00:00 2001 From: tikitavi Date: Wed, 13 Mar 2019 02:57:34 +0300 Subject: [PATCH] fixing dump of ordered dictionaries in inventory script (#4343) --- contrib/inventory_builder/inventory.py | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/inventory_builder/inventory.py b/contrib/inventory_builder/inventory.py index c150cd40f..ab31a7eaa 100644 --- a/contrib/inventory_builder/inventory.py +++ b/contrib/inventory_builder/inventory.py @@ -46,6 +46,7 @@ AVAILABLE_COMMANDS = ['help', 'print_cfg', 'print_ips', 'load'] _boolean_states = {'1': True, 'yes': True, 'true': True, 'on': True, '0': False, 'no': False, 'false': False, 'off': False} yaml = YAML() +yaml.Representer.add_representer(OrderedDict, yaml.Representer.represent_dict) def get_var_as_bool(name, default):