puppet_litmus 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/puppet_litmus/rake_helper.rb +11 -0
- data/lib/puppet_litmus/rake_tasks.rb +9 -0
- data/lib/puppet_litmus/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8481f68695821e0c43b5f940fc3d3923a591d9eea517b584c68ac89a4a2d8705
|
4
|
+
data.tar.gz: cc2c8065859e96290760d4320d701dc8cfb367041360b5287eda12a9fdf9eb45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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-
|
11
|
+
date: 2023-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bolt
|