add possibility of redefine parameter
possibility to define parameter nodes_uri
(thats allow targeting node-config-dir)
trough salt-metadata to avoid issues, when
reclass inventory failed due incorrect node configurations
even if broken-configs does not used
related to: https://gerrit.mcp.mirantis.net/#/c/7818/3
Change-Id: I009a7434cc0372361bb2e44374534ee95aefcd19
diff --git a/_modules/reclass.py b/_modules/reclass.py
index eace0bf..4dc988d 100644
--- a/_modules/reclass.py
+++ b/_modules/reclass.py
@@ -115,7 +115,8 @@
def _get_nodes_dir():
defaults = find_and_read_configfile()
- return os.path.join(defaults.get('inventory_base_uri'), 'nodes')
+ return defaults.get('nodes_uri') or \
+ os.path.join(defaults.get('inventory_base_uri'), 'nodes')
def _get_classes_dir():