kitchen-salt 0.0.13 → 0.0.14
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 +8 -8
- data/lib/kitchen-salt/version.rb +1 -1
- data/lib/kitchen/provisioner/salt_solo.rb +13 -5
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
NDcwOTFlMGJmYmQyNjEzODU5ODU3ZDZlOGE1ZDhkMmM2NDQyNjk2NQ==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
ZjNkYzYzMzhlMTg4Mjc1ZmJkMTk0MTU2ZThhZjNiNjU3ODA3NDNiMA==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
NDk2ZTQ5ZTUzOWY5NzU2NjBmZDNiYjZjM2NiMzRhODU2Y2M1ZjIzNWNkZGI2
|
|
10
|
+
NWYzMGY0Yjk1NTkzMjE0NGRkMmU0MGQ1ZTM5NTQ0OWE1YzBhYjViOTgzYmM3
|
|
11
|
+
MzI0NTMzN2EyOGRhYjk4NDJhMzA2ZjM4MmMxYjJmMmRkZDgxNjE=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
ZWMyOWE1YmMwZTJmM2U4YjU5ZDMyZmFiM2Y1ZWRkOGYxYzg0MTEwZDZiNmE2
|
|
14
|
+
ZGY4YWYxYTI3NGU4OTVjZTcyMTI3MWQ5NmIwNDIzYmNiMThlNDI4MzRmMDIy
|
|
15
|
+
MGYzODQ4MjMzMTRlNjAzMDE0ZGU3YWY4ODc4MTI1OTM0MDQwYjE=
|
data/lib/kitchen-salt/version.rb
CHANGED
|
@@ -53,7 +53,7 @@ module Kitchen
|
|
|
53
53
|
default_config :salt_run_highstate, true
|
|
54
54
|
|
|
55
55
|
# salt-call version that supports the undocumented --retcode-passthrough command
|
|
56
|
-
RETCODE_VERSION = '
|
|
56
|
+
RETCODE_VERSION = '0.17.5'
|
|
57
57
|
|
|
58
58
|
def install_command
|
|
59
59
|
debug(diagnose())
|
|
@@ -175,12 +175,20 @@ module Kitchen
|
|
|
175
175
|
if config[:salt_version] > RETCODE_VERSION && config[:salt_version] != 'latest'
|
|
176
176
|
# hope for the best and hope it works eventually
|
|
177
177
|
cmd = cmd + " --retcode-passthrough"
|
|
178
|
-
else
|
|
179
|
-
# scan the output for signs of failure, there is a risk of false negatives
|
|
180
|
-
fail_grep = 'grep Result.*False'
|
|
181
|
-
cmd << " 2>&1 | tee /tmp/salt-call-output ; (sed '/#{fail_grep}/d' /tmp/salt-call-output | #{fail_grep} ; EC=$? ; [ ${EC} -eq 0 ] && exit 1 ; [ ${EC} -eq 1 ] && exit 0)"
|
|
182
178
|
end
|
|
183
179
|
|
|
180
|
+
# scan the output for signs of failure, there is a risk of false negatives
|
|
181
|
+
fail_grep = 'grep -e Result.*False -e Data.failed.to.compile'
|
|
182
|
+
fail_grep = 'grep -e Result.*False'
|
|
183
|
+
# capture any non-zero exit codes from the salt-call | tee pipe
|
|
184
|
+
cmd = 'set -o pipefail ; ' << cmd
|
|
185
|
+
# Capture the salt-call output & exit code
|
|
186
|
+
cmd << " 2>&1 | tee /tmp/salt-call-output ; SC=$? ; echo salt-call exit code: $SC ;"
|
|
187
|
+
# check the salt-call output for fail messages
|
|
188
|
+
cmd << " (sed '/#{fail_grep}/d' /tmp/salt-call-output | #{fail_grep} ; EC=$? ; echo salt-call output grep exit code ${EC} ;"
|
|
189
|
+
# use the non-zer exit code from salt-call, then invert the results of the grep for failures
|
|
190
|
+
cmd << " [ ${SC} -ne 0 ] && exit ${SC} ; [ ${EC} -eq 0 ] && exit 1 ; [ ${EC} -eq 1 ] && exit 0)"
|
|
191
|
+
|
|
184
192
|
cmd
|
|
185
193
|
end
|
|
186
194
|
|