Add a recipe to join the private Zerotier network

This commit is contained in:
Greg Karékinian 2021-01-22 18:33:58 +01:00
parent dd78b8cf7e
commit 9b4756441a

View File

@ -2,3 +2,15 @@
# Cookbook:: kosmos_zerotier
# Recipe:: default
#
zerotier_controller = search(:node, "role:zerotier_controller").first
controller_url = "http://#{zerotier_controller["knife_zero"]["host"]}:#{node['kosmos_zerotier']['server_port']}"
credentials = data_bag_item("credentials", "zerotier")
zerotier_network credentials["network_id"] do
node_name node['fqdn']
auth_token credentials["auth_token"]
central_url controller_url
end