puppet_litmus 1.1.1 → 1.1.3

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
  SHA256:
3
- metadata.gz: ec6aae4d826162090c6d1d7b05df110263b1d77b77879e72623529912a0948fb
4
- data.tar.gz: b1d98ca5cad46e027ab1a0c15fdb37ae3e49b8dc70ddf423f2f34ec05e784e7b
3
+ metadata.gz: 8481f68695821e0c43b5f940fc3d3923a591d9eea517b584c68ac89a4a2d8705
4
+ data.tar.gz: cc2c8065859e96290760d4320d701dc8cfb367041360b5287eda12a9fdf9eb45
5
5
  SHA512:
6
- metadata.gz: 33254eeeb62d7be13711ee6941a666141715a07f7f3ecf37fb9dc3983403345b6880f4ff060b37b16b83ef7e5ab173982d4323be82af6aa720e59b7fe037f29c
7
- data.tar.gz: a06db9fc523e6c6a586ff852cb60769313eb0dfb4be435f24f24038fda950fa87536b8f51248f8d7f36ed431189242f4d57f8dfdf8793d4c0f28d56244b7027a
6
+ metadata.gz: 9aefe6ab00559d2a6726626e4d2d3819025565c152624c0c42e88c1a2c323c1b025540fbca5bd64a110b7947682f5fe173ea6788425be6c5512e7653ef6eeee0
7
+ data.tar.gz: 11f0c2f06e8be551a2c7efdd262256fa3f90fb5942576c2665d4064a23357a1a20081baa81983fcdd1e39832a1c7a0f3e84a999bf35c12386cf26ebbe9c31201
@@ -142,6 +142,17 @@ module PuppetLitmus::RakeHelper
142
142
 
143
143
  # using boltspec, when the runner is called it changes the inventory_hash dropping the version field. The clone works around this
144
144
  bolt_result = run_task('puppet_agent::install', targets, params, config: DEFAULT_CONFIG_DATA, inventory: inventory_hash.clone)
145
+ targets.each do |target|
146
+ params = {
147
+ 'path' => '/opt/puppetlabs/bin'
148
+ }
149
+ node_facts = facts_from_node(inventory_hash, target)
150
+ next unless node_facts['provisioner'] == 'vagrant'
151
+
152
+ puts "Adding puppet agent binary to the secure_path on target #{target}."
153
+ result = run_task('provision::fix_secure_path', target, params, config: DEFAULT_CONFIG_DATA, inventory: inventory_hash.clone)
154
+ raise_bolt_errors(result, "Failed to add the Puppet agent binary to the secure_path on target #{target}.")
155
+ end
145
156
  raise_bolt_errors(bolt_result, 'Installation of agent failed.')
146
157
  bolt_result
147
158
  end
@@ -75,6 +75,8 @@ namespace :litmus do
75
75
  task :provision, [:provisioner, :platform, :inventory_vars] do |_task, args|
76
76
  Rake::Task['spec_prep'].invoke
77
77
 
78
+ retry_count = 3
79
+ current_retry_count = 0
78
80
  begin
79
81
  spinner = start_spinner("Provisioning #{args[:platform]} using #{args[:provisioner]} provisioner.")
80
82
 
@@ -94,6 +96,13 @@ namespace :litmus do
94
96
  check_connectivity?(inventory_hash_from_inventory_file, target)
95
97
  end
96
98
  end
99
+ rescue PuppetLitmus::RakeHelper::LitmusTimeoutError
100
+ current_retry_count += 1
101
+ Rake::Task['litmus:tear_down'].invoke(target_names.first)
102
+ raise if current_retry_count > retry_count
103
+
104
+ puts "Provision of node #{target_names.first} failed, Retrying #{current_retry_count} of #{retry_count}"
105
+ retry
97
106
  ensure
98
107
  stop_spinner(spinner)
99
108
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  # version of this gem
4
4
  module PuppetLitmus
5
- VERSION = '1.1.1'
5
+ VERSION = '1.1.3'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet_litmus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet, Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-27 00:00:00.000000000 Z
11
+ date: 2023-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bolt