pass command line options into settings
diff --git a/reclass/adapters/ansible.py b/reclass/adapters/ansible.py
index 1bf509d..1887245 100755
--- a/reclass/adapters/ansible.py
+++ b/reclass/adapters/ansible.py
@@ -61,6 +61,7 @@
storage = get_storage(options.storage_type, options.nodes_uri, options.classes_uri)
class_mappings = defaults.get('class_mappings')
+ defaults.update(vars(options))
settings = Settings(defaults)
reclass = Core(storage, class_mappings, settings)
diff --git a/reclass/adapters/salt.py b/reclass/adapters/salt.py
index 4d6cccc..813f390 100755
--- a/reclass/adapters/salt.py
+++ b/reclass/adapters/salt.py
@@ -95,6 +95,7 @@
nodeinfo_help='output pillar data for a specific node',
defaults=defaults)
class_mappings = defaults.get('class_mappings')
+ defaults.update(vars(options))
if options.mode == MODE_NODEINFO:
data = ext_pillar(options.nodename, {},
@@ -102,14 +103,16 @@
inventory_base_uri=options.inventory_base_uri,
nodes_uri=options.nodes_uri,
classes_uri=options.classes_uri,
- class_mappings=class_mappings)
+ class_mappings=class_mappings,
+ **defaults)
else:
data = top(minion_id=None,
storage_type=options.storage_type,
inventory_base_uri=options.inventory_base_uri,
nodes_uri=options.nodes_uri,
classes_uri=options.classes_uri,
- class_mappings=class_mappings)
+ class_mappings=class_mappings,
+ **defaults)
print output(data, options.output, options.pretty_print, options.no_refs)
diff --git a/reclass/cli.py b/reclass/cli.py
index 6023bfa..d1b22b8 100644
--- a/reclass/cli.py
+++ b/reclass/cli.py
@@ -29,6 +29,7 @@
options = get_options(RECLASS_NAME, VERSION, DESCRIPTION, defaults=defaults)
storage = get_storage(options.storage_type, options.nodes_uri, options.classes_uri)
class_mappings = defaults.get('class_mappings')
+ defaults.update(vars(options))
settings = Settings(defaults)
reclass = Core(storage, class_mappings, settings)