hieracles 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/Gemfile +2 -0
- data/README.md +54 -8
- data/bin/hc +12 -6
- data/bin/ppdb +42 -0
- data/hc.1 +50 -8
- data/lib/hieracles.rb +2 -2
- data/lib/hieracles/config.rb +31 -19
- data/lib/hieracles/format.rb +4 -0
- data/lib/hieracles/formats/console.rb +49 -16
- data/lib/hieracles/formats/csv.rb +12 -8
- data/lib/hieracles/formats/json.rb +19 -6
- data/lib/hieracles/formats/plain.rb +24 -3
- data/lib/hieracles/formats/rawyaml.rb +4 -0
- data/lib/hieracles/formats/yaml.rb +4 -0
- data/lib/hieracles/node.rb +55 -10
- data/lib/hieracles/notification.rb +31 -0
- data/lib/hieracles/options/hc.rb +109 -0
- data/lib/hieracles/options/ppdb.rb +32 -0
- data/lib/hieracles/optparse.rb +4 -43
- data/lib/hieracles/puppetdb.rb +12 -0
- data/lib/hieracles/puppetdb/apierror.rb +10 -0
- data/lib/hieracles/puppetdb/client.rb +63 -0
- data/lib/hieracles/puppetdb/filter.rb +15 -0
- data/lib/hieracles/puppetdb/fixsslconnectionadapter.rb +25 -0
- data/lib/hieracles/puppetdb/query.rb +79 -0
- data/lib/hieracles/puppetdb/request.rb +44 -0
- data/lib/hieracles/puppetdb/response.rb +14 -0
- data/ppdb.1 +158 -0
- data/spec/files/config.yml +2 -0
- data/spec/files/config_withdb.yml +9 -0
- data/spec/files/facts.json +110 -0
- data/spec/files/facts.yaml +103 -0
- data/spec/files/hiera_columns.yaml +16 -0
- data/spec/files/hiera_deep.yaml +17 -0
- data/spec/files/hiera_deeper.yaml +17 -0
- data/spec/files/ssl/bad-ca.crt +1 -0
- data/spec/files/ssl/bad-cert.crt +1 -0
- data/spec/files/ssl/bad-key.pem +1 -0
- data/spec/files/ssl/ca.crt +16 -0
- data/spec/files/ssl/cert.crt +16 -0
- data/spec/files/ssl/key-pass.pem +18 -0
- data/spec/files/ssl/key.pem +15 -0
- data/spec/lib/config_spec.rb +51 -11
- data/spec/lib/format_spec.rb +5 -0
- data/spec/lib/formats/console_spec.rb +24 -3
- data/spec/lib/formats/csv_spec.rb +15 -0
- data/spec/lib/formats/json_spec.rb +22 -2
- data/spec/lib/formats/plain_spec.rb +23 -3
- data/spec/lib/formats/rawyaml_spec.rb +13 -0
- data/spec/lib/formats/yaml_spec.rb +138 -48
- data/spec/lib/hiera_spec.rb +0 -1
- data/spec/lib/hieracles_spec.rb +8 -0
- data/spec/lib/interpolate_spec.rb +49 -0
- data/spec/lib/node_spec.rb +50 -9
- data/spec/lib/notification_spec.rb +29 -0
- data/spec/lib/options/hc_spec.rb +82 -0
- data/spec/lib/optparse_spec.rb +7 -7
- data/spec/lib/puppetdb/apierror_spec.rb +11 -0
- data/spec/lib/puppetdb/client_spec.rb +64 -0
- data/spec/lib/puppetdb/fixsslconnectionadapter_spec.rb +107 -0
- data/spec/lib/puppetdb/query_spec.rb +39 -0
- data/spec/lib/puppetdb/request_spec.rb +61 -0
- data/spec/lib/puppetdb/response_spec.rb +13 -0
- data/spec/spec_helper.rb +4 -4
- metadata +133 -30
- data/Rakefile +0 -14
- data/hieracles.gemspec +0 -90
- data/lib/hieracles/help.rb +0 -38
- data/spec/lib/help_spec.rb +0 -8
data/lib/hieracles/help.rb
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
module Hieracles
|
2
|
-
module Help
|
3
|
-
|
4
|
-
def self.usage
|
5
|
-
return <<-END
|
6
|
-
|
7
|
-
Usage: hc <fqdn> <command> [extra_args]
|
8
|
-
|
9
|
-
Available commands:
|
10
|
-
info provides the farm, datacenter, country
|
11
|
-
associated to the given fqdn
|
12
|
-
files list all files containing params affecting this fqdn
|
13
|
-
(in more than commons)
|
14
|
-
paths list all file paths for files with params
|
15
|
-
modules list modules included in the farm where the node is
|
16
|
-
params list params for the node matching the fqdn
|
17
|
-
An extra filter string can be added to limit the list
|
18
|
-
use ruby regexp without the enclosing slashes
|
19
|
-
eg. hc <fqdn> params postfix.*version
|
20
|
-
eg. hc <fqdn> params '^postfix'
|
21
|
-
eg. hc <fqdn> params 'version$'
|
22
|
-
allparams same as params but including the common.yaml params (huge)
|
23
|
-
Also accepts a search string
|
24
|
-
|
25
|
-
Extra args:
|
26
|
-
-f <plain|console|csv|yaml|rawyaml> default console
|
27
|
-
-p extraparam=what;anotherparam=this
|
28
|
-
-c <configfile>
|
29
|
-
-h <hierafile>
|
30
|
-
-b <basepath> default ./
|
31
|
-
-e <encdir>
|
32
|
-
-y <fact_file> - facts in yaml format
|
33
|
-
-j <fact_file> - facts in json format
|
34
|
-
-v just displays the version of Hieracles
|
35
|
-
END
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|