vagrant-pe_build 0.19.0 → 0.19.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: faa7c9ee45abc5e36f92d3b66353e9f439c93e3a
4
- data.tar.gz: defb7b188e664653f8a33dc09ea960e88b6c498e
3
+ metadata.gz: 2159e1da15e44aa5d1de8f16537342bb4d8912cb
4
+ data.tar.gz: 92df0b9ba7ed46d782b140de9489c49015a13594
5
5
  SHA512:
6
- metadata.gz: 55e43d710eb6b842e9a9c77e25e02e5caed072ff1b458540f16b29356c2682a5970e627151ac8696cd7a4c96eaba67511ab09f453fb4380aa538bec027583b2e
7
- data.tar.gz: ab0f79dc7cbbcb14a68fb500c36907812e4fafd02f4fa5095e631f5a9697fda74a35c0068fde056a77ab8f9050e98c3623c3e0ad16a947d460c92504929d0fc3
6
+ metadata.gz: 7b76f0571284c1f48f0ac85c16f73667d7b556fc12b5f703b0f4426f73d2c0c9665cc0e0ff13c8399fc0e2235e055433bf0a08879d9baa3f26d509e5f806a48d
7
+ data.tar.gz: 3d5fbd8965b42eb61749b799ccdecb611831dbac489f9128fefb24fcfd913dabd47ecc077536891f6ecefab04cb9b12c8d6eb53b4b89205a357c158ec0716754
data/CHANGELOG CHANGED
@@ -1,6 +1,18 @@
1
1
  vagrant-pe_build
2
2
  ================
3
3
 
4
+ 0.19.1
5
+ ------
6
+
7
+ 2019-06-05
8
+
9
+ This is a backwards compatible bugfix release.
10
+
11
+ * Fix the pe_agent provisioner to read and use the master's version number
12
+ instead of the agent's when determining how to provision and clean up
13
+ certificates.
14
+
15
+
4
16
  0.19.0
5
17
  ------
6
18
 
@@ -21,7 +33,6 @@ This is a backwards compatible feature release.
21
33
  * Add support for PE 2018.1.8
22
34
 
23
35
 
24
-
25
36
  0.18.2
26
37
  ------
27
38
 
@@ -190,6 +190,13 @@ bash pe_frictionless_installer.sh
190
190
  # This method will raise an error if commands can't be run on the
191
191
  # master VM.
192
192
  ensure_reachable(master_vm)
193
+ master_version = ''
194
+ err_code = master_vm.communicate.sudo('cat /opt/puppetlabs/server/pe_version', error_check: false) do |type, output|
195
+ master_version << output if type == :stdout
196
+ end
197
+ # Check for unrecognized PE file layouts, which are assumed to be older
198
+ # than 2019.0.
199
+ master_version = '0.0' if (err_code != 0)
193
200
 
194
201
  agent_certname = facts['certname']
195
202
 
@@ -197,7 +204,7 @@ bash pe_frictionless_installer.sh
197
204
  # inverted as `grep -q` will exit with 1 if the certificate is not
198
205
  # found.
199
206
  # TODO: Extend paths to PE 3.x masters.
200
- csr_check = PEBuild::Util::VersionString.compare(config.version, '2019.0.0') < 0 ?
207
+ csr_check = PEBuild::Util::VersionString.compare(master_version, '2019.0') < 0 ?
201
208
  "/opt/puppetlabs/bin/puppet cert list | grep -q -F #{agent_certname}" :
202
209
  "/opt/puppetlabs/bin/puppetserver ca list | grep -q -F #{agent_certname}"
203
210
  if not master_vm.communicate.test(csr_check, :sudo => true)
@@ -217,7 +224,7 @@ bash pe_frictionless_installer.sh
217
224
 
218
225
  # TODO: Extend paths to PE 3.x masters.
219
226
  # NOTE: 2019.0.0 has Cert SAN allowed by default
220
- sign_cert = PEBuild::Util::VersionString.compare(config.version, '2019.0.0') < 0 ?
227
+ sign_cert = PEBuild::Util::VersionString.compare(master_version, '2019.0') < 0 ?
221
228
  "/opt/puppetlabs/bin/puppet cert --allow-dns-alt-names sign #{agent_certname}" :
222
229
  "/opt/puppetlabs/bin/puppetserver ca sign --certname #{agent_certname}"
223
230
  shell_provision_commands(master_vm, sign_cert)
@@ -237,9 +244,17 @@ bash pe_frictionless_installer.sh
237
244
  return
238
245
  end
239
246
 
247
+ master_version = ''
248
+ err_code = master_vm.communicate.sudo('cat /opt/puppetlabs/server/pe_version', error_check: false) do |type, output|
249
+ master_version << output if type == :stdout
250
+ end
251
+ # Check for unrecognized PE file layouts, which are assumed to be older
252
+ # than 2019.0.
253
+ master_version = '0.0' if (err_code != 0)
254
+
240
255
  # TODO: Extend paths to PE 3.x masters.
241
256
  # TODO: Find a way to query an individual certificate through puppetserver ca.
242
- cert_check = PEBuild::Util::VersionString.compare(config.version, '2019.0.0') < 0 ?
257
+ cert_check = PEBuild::Util::VersionString.compare(master_version, '2019.0') < 0 ?
243
258
  "/opt/puppetlabs/bin/puppet cert list #{agent_certname}" :
244
259
  "/opt/puppetlabs/bin/puppetserver ca list --all| grep -q -F #{agent_certname}"
245
260
  unless master_vm.communicate.test(cert_check, :sudo => true)
@@ -1,3 +1,3 @@
1
1
  module PEBuild
2
- VERSION = '0.19.0'.freeze
2
+ VERSION = '0.19.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-pe_build
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.19.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrien Thebo
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-05-30 00:00:00.000000000 Z
12
+ date: 2019-06-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby-progressbar