load_yaml(yaml_file, template_context) if template_context is not nil, it will expand read the yaml. this will read "<< : hosts/$tbox_group" in hosts file.
Signed-off-by: Wei Jihui weijihuiall@163.com --- lib/job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/job.rb b/lib/job.rb index f24435a0..5c2c9517 100755 --- a/lib/job.rb +++ b/lib/job.rb @@ -305,7 +305,7 @@ class Job
hosts_file = get_hosts_file if hosts_file - hwconfig = load_yaml(hosts_file, nil) + hwconfig = load_yaml(hosts_file, {}) @job[source_file_symkey(hosts_file)] = nil @job.merge!(hwconfig) { |_k, a, _b| a } # job's key/value has priority over hwconfig @load_hosts_done = true