mofa 0.3.37 → 0.3.38
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mofa/provision_cmd.rb +5 -2
- data/lib/mofa/version.rb +1 -1
- metadata +2 -2
data/lib/mofa/provision_cmd.rb
CHANGED
@@ -198,6 +198,8 @@ class ProvisionCmd < MofaCmd
|
|
198
198
|
snapshot_or_release = cookbook.is_a?(SourceCookbook) ? 'snapshot' : 'release'
|
199
199
|
out = ssh_exec!(ssh, "sudo chown -R #{Mofa::Config.config['ssh_user']}.#{Mofa::Config.config['ssh_user']} #{solo_dir}")
|
200
200
|
puts "ERROR (#{out[0]}): #{out[2]}" if out[0] != 0
|
201
|
+
out = ssh_exec!(ssh, '[ -d /var/lib/mofa ] || sudo mkdir /var/lib/mofa')
|
202
|
+
puts "ERROR (#{out[0]}): #{out[2]}" if out[0] != 0
|
201
203
|
out = ssh_exec!(ssh, "echo #{cookbook.name} | sudo tee /var/lib/mofa/last_cookbook_name")
|
202
204
|
puts "ERROR (#{out[0]}): #{out[2]}" if out[0] != 0
|
203
205
|
out = ssh_exec!(ssh, "echo '#{snapshot_or_release}' | sudo tee /var/lib/mofa/last_cookbook_snapshot_or_release")
|
@@ -208,12 +210,13 @@ class ProvisionCmd < MofaCmd
|
|
208
210
|
puts "ERROR (#{out[0]}): #{out[2]}" if out[0] != 0
|
209
211
|
out = ssh_exec!(ssh, "echo '#!/bin/bash' | sudo tee /usr/bin/mofa_log && echo 'cat /var/lib/mofa/last_run/log' | sudo tee -a /usr/bin/mofa_log && sudo chmod 755 /usr/bin/mofa_log")
|
210
212
|
puts "ERROR (#{out[0]}): #{out[2]}" if out[0] != 0
|
213
|
+
out = ssh_exec!(ssh, "date '+%Y-%m-%d %H:%M:%S' | sudo tee -a /var/lib/mofa/last_timestamp")
|
214
|
+
puts "ERROR (#{out[0]}): #{out[2]}" if out[0] != 0
|
211
215
|
out = ssh_exec!(ssh, "sudo find #{solo_dir} -type d | xargs chmod 700")
|
212
216
|
puts "ERROR (#{out[0]}): #{out[2]}" if out[0] != 0
|
213
217
|
out = ssh_exec!(ssh, "sudo find #{solo_dir} -type f | xargs chmod 600")
|
214
218
|
puts "ERROR (#{out[0]}): #{out[2]}" if out[0] != 0
|
215
|
-
|
216
|
-
puts "ERROR (#{out[0]}): #{out[2]}" if out[0] != 0
|
219
|
+
|
217
220
|
end
|
218
221
|
end
|
219
222
|
at_least_one_chef_solo_run_failed = true unless chef_solo_runs[hostname]['status'] == 'SUCCESS'
|
data/lib/mofa/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mofa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.38
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-03-
|
12
|
+
date: 2017-03-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|