Commit 40a3c193 authored by nanahira's avatar nanahira

fix

parent 52118fab
......@@ -50,7 +50,7 @@ class InventoryBuilder {
const rawHostsForSwitch = rawHosts.map(rh => {
const hostVars = JSON.parse(JSON.stringify(rh[1]));
hostVars.ansible_ssh_host = hostVars.address;
return [rh[0], hostVars];
return [`switch-${rh[0]}`, hostVars];
});
const switchHosts = Object.fromEntries(rawHostsForSwitch);
const result = YAML.stringify({ wg: { hosts, vars }, switch: { hosts: switchHosts, vars: JSON.parse(JSON.stringify(vars)) } });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment