alpha_omega 0.0.178 → 0.0.179

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.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/alpha_omega/utils.rb +6 -5
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.178
1
+ 0.0.179
@@ -90,8 +90,8 @@ module AlphaOmega
90
90
 
91
91
  config.task "#{task_name}.#{pod_name}.app" do # task host.pod1.app
92
92
  cap_roles.each do |cap_role, cap_preds|
93
- if $this_host["local_pods"] && $this_host["local_pods"].member?(this_node["env_pod"])
94
- role cap_role, task_name, cap_preds
93
+ if $this_host["local_pods"] && $this_host["local_pods"].member?(node["env_pod"])
94
+ role cap_role, node["node_name"], cap_preds
95
95
  else
96
96
  role cap_role, remote_name, cap_preds
97
97
  end
@@ -176,10 +176,11 @@ module AlphaOmega
176
176
  $this_pod = File.read("/etc/podname").strip
177
177
  config.set :current_pod, $this_pod
178
178
 
179
- $this_host = Socket.gethostname.chomp.split(".")[0]
180
- dna_base = "#{node_home}/pods/#{$this_pod}/#{$this_host}"
179
+ this_host = Socket.gethostname.chomp.split(".")[0]
180
+ dna_base = "#{node_home}/pods/#{$this_pod}/#{this_host}"
181
181
  dna = File.exists?("#{dna_base}.yaml") ? YAML.load(File.read("#{dna_base}.yaml")) : JSON.load(File.read("#{dna_base}.json"))
182
- this_node = AlphaOmega.node_defaults(dna, $this_pod, $this_host)
182
+ this_node = AlphaOmega.node_defaults(dna, $this_pod, this_host)
183
+ $this_host = this_node
183
184
 
184
185
  ((this_node["pods"] || []) + [$this_pod]).inject({}) do |pods, pod_name|
185
186
  pods[pod_name] = {
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alpha_omega
3
3
  version: !ruby/object:Gem::Version
4
- hash: 379
4
+ hash: 377
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 178
10
- version: 0.0.178
9
+ - 179
10
+ version: 0.0.179
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Nghiem