puppet_litmus 0.3.1 → 0.4.0
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_tasks.rb +4 -8
- data/lib/puppet_litmus/serverspec.rb +2 -0
- data/lib/puppet_litmus/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8793e294b24574549eb709f40fd2f4c60a7995e
|
4
|
+
data.tar.gz: 5f786dd179b80096027dbd60a5a0e3cfb805dc19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddb4a53476e159cf891c661830f6d94af3600c1a6ce4127ca3cd7b9401aa51cd3efca458794b0e8ebd040b3269f783b52da3e285a1a99892ce0e9ae7f5e693b5
|
7
|
+
data.tar.gz: 9a730ae696a455ecd35ec5c544920b0a349a59aa9c42c63f897fe20d0c7e2dfe9757ae2cbee70bd3ce5a5a61b05569cc62f4f20418a94d7cf0cac8adb28f2325
|
@@ -116,13 +116,9 @@ namespace :litmus do
|
|
116
116
|
|
117
117
|
params = { 'action' => 'provision', 'platform' => args[:platform], 'inventory' => Dir.pwd }
|
118
118
|
results = run_task("provision::#{args[:provisioner]}", 'localhost', params, config: config_data, inventory: nil)
|
119
|
-
results.
|
120
|
-
|
121
|
-
|
122
|
-
else
|
123
|
-
puts "#{result['result']['node_name']}, #{args[:platform]}"
|
124
|
-
end
|
125
|
-
end
|
119
|
+
raise "Failed provisioning #{args[:platform]} using #{args[:provisioner]}\n#{results.first}" if results.first['status'] != 'success'
|
120
|
+
|
121
|
+
puts "#{results.first['result']['node_name']}, #{args[:platform]}"
|
126
122
|
end
|
127
123
|
|
128
124
|
desc 'install puppet agent, [:collection, :target_node_name]'
|
@@ -144,7 +140,7 @@ namespace :litmus do
|
|
144
140
|
results.each do |result|
|
145
141
|
if result['status'] != 'success'
|
146
142
|
command_to_run = "bolt task run puppet_agent::install --targets #{result['node']} --inventoryfile inventory.yaml --modulepath #{config_data['modulepath']}"
|
147
|
-
|
143
|
+
raise "Failed on #{result['node']}\n#{result}\ntry running '#{command_to_run}'"
|
148
144
|
end
|
149
145
|
end
|
150
146
|
|
@@ -24,6 +24,7 @@ module PuppetLitmus::Serverspec
|
|
24
24
|
# :manifest_file_location [Path] The place on the target system.
|
25
25
|
# :prefix_command [String] prefixes the puppet apply command; eg "export LANGUAGE='ja'".
|
26
26
|
# :debug [Boolean] run puppet apply with the debug flag.
|
27
|
+
# :noop [Boolean] run puppet apply with the noop flag.
|
27
28
|
# @param [Block] his method will yield to a block of code passed by the caller; this can be used for additional validation, etc.
|
28
29
|
# @return [Object] A result object from the apply.
|
29
30
|
def apply_manifest(manifest, opts = {})
|
@@ -42,6 +43,7 @@ module PuppetLitmus::Serverspec
|
|
42
43
|
command_to_run += " --modulepath #{Dir.pwd}/spec/fixtures/modules" if target_node_name.nil? || target_node_name == 'localhost'
|
43
44
|
command_to_run += ' --detailed-exitcodes' if !opts[:catch_changes].nil? && (opts[:catch_changes] == true)
|
44
45
|
command_to_run += ' --debug' if !opts[:debug].nil? && (opts[:debug] == true)
|
46
|
+
command_to_run += ' --noop' if !opts[:noop].nil? && (opts[:noop] == true)
|
45
47
|
result = run_command(command_to_run, target_node_name, config: nil, inventory: inventory_hash)
|
46
48
|
|
47
49
|
raise "apply manifest failed\n`#{command_to_run}`\n======\n#{result}" if result.first['result']['exit_code'] != 0 && opts[:expect_failures] != true
|
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: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bolt
|