fingerpuppet 0.0.2 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9df93929da6a2a6a1dff9bb4f411146bab36e76b
4
+ data.tar.gz: 368735d4d1046aae97d21671a0a43b7a3dd63208
5
+ SHA512:
6
+ metadata.gz: 3d6ea04279f15c0cf9cf2f3e367b59c3010167e68d6034a69df3be5c93bc452d67a9f88cd981cadf28b00e44fcc5aae9f074109a0d7d8a58bafc84eb6e529dae
7
+ data.tar.gz: 117541b7afb8bc25d057901c3163c784bf65f6167f0bd21eb1f00ade0fd13a0eb5cc0fd3e64fd8a38ec01601d1722cef7918c0a44dc876839a3cd6fdd806c2a7
data/README.md CHANGED
@@ -36,14 +36,74 @@ Steps for using the API with fingerpuppet:
36
36
  Your Puppetmaster must be configured to allow requests other than certificate requests.
37
37
  See [http://docs.puppetlabs.com/guides/rest_auth_conf.html](http://docs.puppetlabs.com/guides/rest_auth_conf.html) for more information.
38
38
 
39
- For example, you could add the stanza below as one of the first rules in `auth.conf` to
40
- allow a single authenticated provisioning system complete access to all endpoints.
39
+ An example `auth.conf` might look something like:
41
40
 
42
- # Allow the provisioner unfettered access to any endpoint
43
- path /
41
+ path ~ ^/catalog/([^/]+)$
42
+ method find
44
43
  auth yes
45
- allow provision.mycompany.com
46
-
44
+ allow $1, provisioner.example.com
45
+
46
+ path ~ ^/node/([^/]+)$
47
+ method find
48
+ auth yes
49
+ allow $1, provisioner.example.com
50
+
51
+ path /certificate_revocation_list/ca
52
+ method find
53
+ auth yes
54
+ allow *
55
+
56
+ path /report
57
+ method save
58
+ auth yes
59
+ allow *
60
+
61
+ path /file
62
+ auth yes
63
+ allow *
64
+
65
+ path /resource
66
+ method find
67
+ auth any
68
+ allow provisioner.example.com
69
+
70
+ path /status
71
+ method find
72
+ auth any
73
+ allow provisioner.example.com
74
+
75
+ path /certificate/ca
76
+ method find
77
+ auth any
78
+ allow *
79
+
80
+ path /certificate/
81
+ method find
82
+ auth any
83
+ allow *
84
+
85
+ path /certificate_request
86
+ method find, save
87
+ auth any
88
+ allow *
89
+
90
+ path /certificate_status
91
+ method find, search, save, destroy
92
+ auth yes
93
+ allow pe-internal-dashboard, provisioner.example.com
94
+
95
+ path /facts
96
+ method find, search
97
+ auth any
98
+ allow *
99
+
100
+ path /facts
101
+ method save
102
+ auth yes
103
+ allow master.puppetlabs.vm, provisioner.example.com
104
+
105
+ path /
106
+ auth any
47
107
 
48
108
  The certname can be specified with `--certname` or with optional `CERTNAME` argument to many options.
49
109
 
@@ -130,7 +130,7 @@ optparse = OptionParser.new { |opts|
130
130
  options[:action] = 'certificate_revocation_list'
131
131
  end
132
132
 
133
- opts.on("--sign [CERTNAME]", "Instruct the Puppetmaster to sign a certificate. Requires significate privileges in auth.conf.") do |certname|
133
+ opts.on("--sign [CERTNAME]", "Instruct the Puppetmaster to sign a certificate. Requires significant privileges in auth.conf.") do |certname|
134
134
  options[:action] = 'sign'
135
135
  options[:certname] ||= certname
136
136
  end
@@ -83,15 +83,16 @@ module Fingerpuppet
83
83
 
84
84
  when 'DELETE'
85
85
  request = Net::HTTP::Delete.new(uri)
86
+ request["Accept"] = opts[:type]
86
87
  when 'HEAD'
87
88
  request = Net::HTTP::Head.new(uri)
89
+ request["Accept"] = opts[:type]
88
90
  else
89
91
  # default to a GET request
90
92
  request = Net::HTTP::Get.new(uri)
93
+ request["Accept"] = opts[:type]
91
94
  end
92
95
 
93
- request["Accept"] = opts[:type]
94
-
95
96
  if @debug
96
97
  puts '------ HTTP Request ------'
97
98
  puts request.to_yaml
metadata CHANGED
@@ -1,23 +1,15 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: fingerpuppet
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 2
9
- version: 0.0.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
10
5
  platform: ruby
11
- authors:
6
+ authors:
12
7
  - Ben Ford
13
8
  autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
-
17
- date: 2013-03-28 00:00:00 -04:00
18
- default_executable:
11
+ date: 2014-05-09 00:00:00.000000000 Z
19
12
  dependencies: []
20
-
21
13
  description: |
22
14
  `fingerpuppet` is a simple library and commandline tool to interact with Puppet's REST API
23
15
  without needing to have Puppet itself installed. This may be integrated, for example,
@@ -27,47 +19,40 @@ description: |
27
19
  perform acceptance testing against a new version of Puppet before upgrading your
28
20
  production master.
29
21
 
22
+ Install the binford2k/fingerpuppet puppet module to get a class that can automatically
23
+ configure your `auth.conf` file under Puppet Enterprise, where that file is managed.
30
24
  email: binford2k@gmail.com
31
- executables:
25
+ executables:
32
26
  - fingerpuppet
33
27
  extensions: []
34
-
35
28
  extra_rdoc_files: []
36
-
37
- files:
29
+ files:
38
30
  - README.md
39
31
  - LICENSE
40
32
  - bin/fingerpuppet
41
33
  - lib/fingerpuppet/restapi.rb
42
- has_rdoc: true
43
34
  homepage: http://github.com/binford2k/fingerpuppet
44
35
  licenses: []
45
-
36
+ metadata: {}
46
37
  post_install_message:
47
38
  rdoc_options: []
48
-
49
- require_paths:
39
+ require_paths:
50
40
  - lib
51
- required_ruby_version: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- segments:
56
- - 0
57
- version: "0"
58
- required_rubygems_version: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- segments:
63
- - 0
64
- version: "0"
41
+ required_ruby_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ required_rubygems_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - '>='
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
65
51
  requirements: []
66
-
67
52
  rubyforge_project:
68
- rubygems_version: 1.3.6
53
+ rubygems_version: 2.0.14
69
54
  signing_key:
70
- specification_version: 3
71
- summary: A simple library and tool to interact with Puppet's REST API without needing Puppet itself installed.
55
+ specification_version: 4
56
+ summary: A simple library and tool to interact with Puppet's REST API without needing
57
+ Puppet itself installed.
72
58
  test_files: []
73
-