mofa 0.3.34 → 0.3.35
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.
- data/lib/mofa/provision_cmd.rb +4 -2
- data/lib/mofa/version.rb +1 -1
- metadata +1 -1
data/lib/mofa/provision_cmd.rb
CHANGED
@@ -198,7 +198,7 @@ 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, "echo #{cookbook.
|
201
|
+
out = ssh_exec!(ssh, "echo #{cookbook.name} | sudo tee /var/lib/mofa/last_cookbook_name")
|
202
202
|
puts "ERROR (#{out[0]}): #{out[2]}" if out[0] != 0
|
203
203
|
out = ssh_exec!(ssh, "echo '#{snapshot_or_release}' | sudo tee /var/lib/mofa/last_cookbook_snapshot_or_release")
|
204
204
|
puts "ERROR (#{out[0]}): #{out[2]}" if out[0] != 0
|
@@ -206,7 +206,9 @@ class ProvisionCmd < MofaCmd
|
|
206
206
|
puts "ERROR (#{out[0]}): #{out[2]}" if out[0] != 0
|
207
207
|
out = ssh_exec!(ssh, "echo #{chef_solo_runs[hostname]['status']}| sudo tee /var/lib/mofa/last_status")
|
208
208
|
puts "ERROR (#{out[0]}): #{out[2]}" if out[0] != 0
|
209
|
-
out = ssh_exec!(ssh, "echo '#!/bin/bash' | sudo tee /usr/bin/mofalog && echo 'cat
|
209
|
+
out = ssh_exec!(ssh, "echo '#!/bin/bash' | sudo tee /usr/bin/mofalog && echo 'cat /var/lib/mofa/last_run/log' | sudo tee -a /usr/bin/mofa_log && sudo chmod 755 /usr/bin/mofa_log")
|
210
|
+
puts "ERROR (#{out[0]}): #{out[2]}" if out[0] != 0
|
211
|
+
out = ssh_exec!(ssh, "sudo chmod 755 #{solo_dir} && sudo chmod 644 #{solo_dir}/log")
|
210
212
|
puts "ERROR (#{out[0]}): #{out[2]}" if out[0] != 0
|
211
213
|
out = ssh_exec!(ssh, "cat #{solo_dir}/log | sudo tee -a /var/log/mofa.log")
|
212
214
|
puts "ERROR (#{out[0]}): #{out[2]}" if out[0] != 0
|
data/lib/mofa/version.rb
CHANGED