Refactor tor usage entirely
Use a custom resource and separate recipe for service configs with pre-set keys and hostnames
This commit is contained in:
@@ -5,6 +5,17 @@
|
||||
|
||||
tor_services = data_bag_item('credentials', 'tor')['services']
|
||||
|
||||
tor_service "ejabberd" do
|
||||
hostname tor_services['ejabberd']['hostname']
|
||||
public_key tor_services['ejabberd']['public_key']
|
||||
secret_key tor_services['ejabberd']['secret_key']
|
||||
# TODO configure IP from node attribute
|
||||
# (This is hardcoded for draco atm)
|
||||
ports [ "5222 148.251.237.73:5222",
|
||||
"5223 148.251.237.73:5223",
|
||||
"5269 148.251.237.73:5269" ]
|
||||
end
|
||||
|
||||
tor_service "web" do
|
||||
hostname tor_services['web']['hostname']
|
||||
public_key tor_services['web']['public_key']
|
||||
|
||||
@@ -5,8 +5,8 @@ provides :tor_service
|
||||
|
||||
property :name, [String], name_property: true
|
||||
property :hostname, [String], required: true
|
||||
property :public_key, [String], required: true
|
||||
property :secret_key, [String], required: true
|
||||
property :public_key, [String], required: true # base64 encoded content of generated key file
|
||||
property :secret_key, [String], required: true # base64 encoded content of generated key file
|
||||
property :ports, [Array], required: true
|
||||
|
||||
default_action :create
|
||||
|
||||
Reference in New Issue
Block a user