Commit 3074c2d7 authored by nanahira's avatar nanahira

fix

parent 58763ff2
...@@ -97,11 +97,11 @@ class InventoryBuilder { ...@@ -97,11 +97,11 @@ class InventoryBuilder {
for (const host of Object.values(this.hosts)) { for (const host of Object.values(this.hosts)) {
host.wgPublickey = await this.wgPublickey(host.wgPrivateKey); host.wgPublickey = await this.wgPublickey(host.wgPrivateKey);
} }
this.vars = await this.loadUtilities();
// console.log(Object.values(this.hosts)); // console.log(Object.values(this.hosts));
const rawHosts = await Promise.all(Object.values(this.hosts).map(async (h) => [h.name, await this.host_vars(h)])); const rawHosts = await Promise.all(Object.values(this.hosts).map(async (h) => [h.name, await this.host_vars(h)]));
const hosts = Object.fromEntries(rawHosts); const hosts = Object.fromEntries(rawHosts);
// console.log(hosts); // console.log(hosts);
this.vars = await this.loadUtilities();
const rawHostsForSwitch = rawHosts.map(rh => { const rawHostsForSwitch = rawHosts.map(rh => {
const hostVars = JSON.parse(JSON.stringify(rh[1])); const hostVars = JSON.parse(JSON.stringify(rh[1]));
hostVars.ansible_ssh_host = hostVars.address; hostVars.ansible_ssh_host = hostVars.address;
......
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