Fix up lndhub hook config, converge all relevant nodes

This commit is contained in:
Râu Cao 2023-01-25 13:01:47 +08:00
parent 3e79955261
commit ad10e8cceb
Signed by: raucao
GPG Key ID: 15E65F399D084BA9
4 changed files with 16 additions and 7 deletions

View File

@ -12,7 +12,9 @@
"hostname": "ejabberd-4",
"ipaddress": "192.168.122.39",
"roles": [
"base",
"kvm_guest",
"ldap_client",
"ejabberd",
"postgresql_client"
],
@ -20,6 +22,7 @@
"kosmos-base",
"kosmos-base::default",
"kosmos_kvm::guest",
"kosmos-dirsrv::hostsfile",
"kosmos_postgresql::hostsfile",
"kosmos-ejabberd::letsencrypt",
"kosmos-ejabberd",
@ -39,7 +42,6 @@
"postfix::sasl_auth",
"hostname::default",
"kosmos-base::letsencrypt",
"kosmos-dirsrv::hostsfile",
"kosmos-ejabberd::firewall",
"tor-full::default"
],
@ -64,4 +66,4 @@
"role[ldap_client]",
"role[ejabberd]"
]
}
}

View File

@ -12,12 +12,17 @@
"hostname": "ejabberd-8",
"ipaddress": "192.168.122.27",
"roles": [
"base",
"kvm_guest",
"ldap_client",
"ejabberd",
"postgresql_client"
],
"recipes": [
"kosmos-base",
"kosmos-base::default",
"kosmos_kvm::guest",
"kosmos-dirsrv::hostsfile",
"kosmos_postgresql::hostsfile",
"kosmos-ejabberd::letsencrypt",
"kosmos-ejabberd",
@ -37,7 +42,6 @@
"postfix::sasl_auth",
"hostname::default",
"kosmos-base::letsencrypt",
"kosmos-dirsrv::hostsfile",
"kosmos-ejabberd::firewall",
"tor-full::default"
],
@ -62,4 +66,4 @@
"role[ldap_client]",
"role[ejabberd]"
]
}
}

View File

@ -21,9 +21,10 @@ postgres_port = node['lndhub-go']['postgres']['port']
begin
akkounts_host = search(:node, "role:akkounts").first["knife_zero"]["host"]
node['lndhub-go']['webhook_url'] = "http://#{akkounts_host}:3000/webhooks/lndhub"
rescue
# No akkounts host found
node.normal['lndhub-go']['webhook_url'] = "http://#{akkounts_host}:3000/webhooks/lndhub"
rescue => e
puts "NO AKKOUNTS HOST FOUND"
puts e.message
end
git source_dir do

View File

@ -4,6 +4,8 @@
<%= "#{key.upcase}_#{k.upcase}" %>=<%= v.to_s %>
<% end %>
<% else %>
<% if value %>
<%= key.upcase %>=<%= value.to_s %>
<% end %>
<% end %>
<% end %>