Move Tor attributes to recipe files

This commit is contained in:
Basti 2019-09-09 13:36:49 +02:00
parent 03b3b2de91
commit 40eb94f091
No known key found for this signature in database
GPG Key ID: BE4634D632D39B67
4 changed files with 20 additions and 12 deletions

View File

@ -1,9 +1,2 @@
node.default["kosmos-ejabberd"]["version"] = "19.02"
node.default["kosmos-ejabberd"]["checksum"] = "aea550c58e61eab04ca9beb8896d8b04f4a79321c21dee160a67ad6787236f51"
node.default["tor"]["HiddenServices"]["ejabberd"] = {
"HiddenServicePorts" => [
"5222 127.0.0.1:5222",
"5223 127.0.0.1:5223",
"5269 127.0.0.1:5269"
]
}

View File

@ -25,7 +25,6 @@
# THE SOFTWARE.
include_recipe "kosmos-postgresql"
include_recipe "tor-full"
cookbook_file "#{Chef::Config[:file_cache_path]}/pg.sql" do
source "pg.sql"
@ -131,3 +130,15 @@ unless node.chef_environment == "development"
command :allow
end
end
#
# Tor hidden service
#
node.override["tor"]["HiddenServices"]["ejabberd"] = {
"HiddenServicePorts" => [
"5222 127.0.0.1:5222",
"5223 127.0.0.1:5223",
"5269 127.0.0.1:5269"
]
}
include_recipe "tor-full"

View File

@ -4,6 +4,3 @@ node.default["kosmos-mastodon"]["streaming_port"] = 4000
node.default["kosmos-mastodon"]["server_name"] = "kosmos.social"
node.default["kosmos-mastodon"]["redis_url"] = "redis://localhost:6379/1"
node.default["kosmos-mastodon"]["sidekiq_threads"] = 25
node.default["tor"]["HiddenServices"]["mastodon"] = {
"HiddenServicePorts" => ["80 127.0.0.1:80"]
}

View File

@ -28,7 +28,6 @@ mastodon_path = node["kosmos-mastodon"]["directory"]
server_name = node["kosmos-mastodon"]["server_name"]
include_recipe "kosmos-nginx"
include_recipe "tor-full"
directory "#{node['nginx']['dir']}/snippets" do
action :create
@ -68,3 +67,11 @@ nginx_site server_name do
end
nginx_certbot_site server_name
#
# Tor hidden service
#
node.override["tor"]["HiddenServices"]["mastodon"] = {
"HiddenServicePorts" => ["80 127.0.0.1:80"]
}
include_recipe "tor-full"