README.md in hieracles-0.1.2 vs README.md in hieracles-0.1.3
- old
+ new
@@ -46,10 +46,11 @@
- modulepath
- basepath
- encpath
- hierafile
- format
+- defaultscope
For an example setup you can check in `spec/files`.
Usage
-------------
@@ -82,21 +83,39 @@
-v - displays version
-y <fact_file> - facts in yaml format
-j <fact_file> - facts in json format
-About facts
-------------------
+About facts aka. scope
+------------------------
_(work in progress)_
Like with Hiera CLI you can use hieracles with defined top-scope variables. Those top-scope vars can be defined with:
- `-p extraparam=what;anotherparam=this`
- `-y <fact_file>` which takes the fact file from a yaml source created by `facter -y` on your node for example, but it can be written manually for experimentation purposes.
- `-j <fact_file>` same as above, but with output of `facter -j`
+You can define a default scope in your configuration file `defaultscope` in `~/.confg/hieracles/config.yml`. For example:
+
+ ---
+ colors: true
+ classpath: farm_modules/%s/manifests/init.pp
+ hierafile: dev/hiera-local.yaml
+ encpath: enc
+ defaultscope:
+ operatingsystem: Debian
+ lsbdistcodename: Jessie
+
+In order the scope with be built from:
+
+- the config file
+- if `-y <file>` option (or `-j`) is present the `defaultscope` in the config file will be totally ignored
+- the `-p key=value` option with overide variable per variable
+
+
Completion
-------------
There is a simple zsh completion file in `tools/completion`.
If you use [oh-my-zsh][omz] put it in `~/.oh-my-zsh/completions`
@@ -126,12 +145,12 @@
dpkg -i hieracles_0.0.6-1_all.deb
Todo
--------------
-- add json format
-- add override information in yaml format
-- add a command to search for node according to a filter
+- add json format (done)
+- add override information in yaml format (done)
+- add a command to search for node according to a filter (done)
- add a command to find all nodes that use a given module
- add a command that finds all nodes for which a params is defined
- detect unused params
- create a repl, which at launch reads all data so the queries are blazing fast
- adapt to other ENCs