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
4 changed files with 16 additions and 7 deletions

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 %>