kitchen-salt 0.0.9 → 0.0.10

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzYwM2Q5ZTRjOTdkYjRmZTQ2NjhkMTE3YWNhN2E4N2JmYTNlOWQ4Yw==
4
+ ZTlhMjg3ZWMzZjAwMjZmODJmYjY5NTFiZjZkOTVmYmY5YTk0OWVmYQ==
5
5
  data.tar.gz: !binary |-
6
- ZWI2NDczNzlmNmNkNjM0M2E4ODFjMGYyYjQ3ZTFiZTg3MzVlZGE0OQ==
6
+ ZWM4ODk4MTgwNmYzNWQ5NmFhMDEyNGFiMGM5NzQ3NWI1NmUyNTExNg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTkwOGQ1MGQ3Njc0NDhhZDI3NDM0M2Q1ZTk2ODRiMDkyMTY4Y2I3NjgxMjZh
10
- MGRkZTBlZGVhMTE3NDRiMjg0N2E3ODA5OTFkYzUzYjVlNDYwOTUwYTRmODYy
11
- YzU0YzQ4NDc5MDVjZmM2YmQ1NzhhNzIyYzZhOWQyNDZkOGI5Nzc=
9
+ NGFiNTZkOWI1MTAzMzA4N2M1MTg0Y2UwZDExYmY2YjI4NWYyODY4NmY4NjMx
10
+ N2M0NzYzMWE0YzE0ZGMzYTBmNDhlNDYwYTZjZjU1MWExYWNmNTIwMjk2ZTUw
11
+ NjBlNjZhM2YwMmZjZmZmODNkYmNjNDU5NTU1Zjc5NzY1N2FjYWY=
12
12
  data.tar.gz: !binary |-
13
- MjJkZWYyMDZlMTg2YTBjNDYyMTk1NDY3YzFjMzJkYWM1MjAxNGNmMDM0NjFm
14
- YmU0YmQ0YjMzYzg5ZWQ0NTQyMjM4ZGQzYjljZmM4Y2Q5ZTRlNjkzOWM3NGRm
15
- ODA2OGIxNjZjZTQ1ZDBjZmFjZjBiNjQzMGI3MTc5MzgyYjdhZDA=
13
+ YTlkNGM3NjNlMTAwMjYwZDA0ZWE5M2RkZWUyNWY4YWVjNWFhNWUxM2ZlMGYy
14
+ ODVlZmYyMGFhNGFjNWEyYzJjYmRhYTkwOGZhNmZjMzBiZGI2NWUxMzNiNTAx
15
+ MjViYmIyYWYyYzJlOTMyYjc4MWQ3Nzk0ZmI0OWM5ZTliYzg4NmE=
@@ -1,5 +1,5 @@
1
1
  module Kitchen
2
2
  module Salt
3
- VERSION = "0.0.9"
3
+ VERSION = "0.0.10"
4
4
  end
5
5
  end
@@ -89,13 +89,24 @@ module Kitchen
89
89
 
90
90
  #{sudo('apt-get')} update
91
91
  #{sudo('apt-get')} install -y salt-minion
92
- elif [ -z "${SALT_VERSION}" ]
92
+ fi
93
+
94
+ # check again, now that an install of some form should have happened
95
+ SALT_VERSION=`salt-call --version | cut -d " " -f 2`
96
+
97
+ if [ -z "${SALT_VERSION}" ]
93
98
  then
94
- echo "No salt-minion installed and I do not know how to install one!"
99
+ echo "No salt-minion installed, install must have failed!!"
100
+ echo "salt_install = #{salt_install}"
101
+ echo "salt_url = #{salt_url}"
102
+ echo "bootstrap_options = #{bootstrap_options}"
103
+ echo "salt_version = #{salt_version}"
104
+ echo "salt_apt_repo = #{salt_apt_repo}"
105
+ echo "salt_apt_repo_key = #{salt_apt_repo_key}"
95
106
  exit 2
96
107
  elif [ "${SALT_VERSION}" = "#{salt_version}" -o "#{salt_version}" = "latest" ]
97
108
  then
98
- echo "You asked for #{salt_version} and you have already got ${SALT_VERSION} installed, sweet!"
109
+ echo "You asked for #{salt_version} and you have ${SALT_VERSION} installed, sweet!"
99
110
  elif [ ! -z "${SALT_VERSION}" -a "#{salt_install}" = "bootstrap" ]
100
111
  then
101
112
  echo "You asked for bootstrap install and you have got ${SALT_VERSION}, hope thats ok!"
@@ -152,7 +163,9 @@ module Kitchen
152
163
  debug("Skipping the ropey --retcode-passthrough argument")
153
164
  # cmd = cmd + " --retcode-passthrough"
154
165
  else
155
- cmd << " 2>&1 | tee /tmp/salt-call-output ; grep -e ERROR -e CRITICAL /tmp/salt-call-output ; [ $? -eq 0 ] && exit 1 ; [ $? -eq 1 ] && exit 0 "
166
+ # grep the output for ERROR or CRITICAL & return a 1 on finding a problem
167
+ fail_grep = 'grep -e ERROR -e CRITICAL'
168
+ 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)"
156
169
  end
157
170
 
158
171
  cmd
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-salt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon McCartney
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-28 00:00:00.000000000 Z
11
+ date: 2014-03-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: salt provisioner for test-kitchen
14
14
  email: