Sebastian Kippe 7c29957ed9
Fix and consolidate firewall rules
Most of them are already defined in the appropriate recipe. And one can
be moved. (These are currently opened on every server for no reason.)
2019-04-19 15:52:56 +01:00

45 lines
1.0 KiB
Ruby

#
# Cookbook Name:: 5apps-xmpp_server
# Recipe:: default
#
# Copyright 2016, 5apps
#
# All rights reserved - Do Not Redistribute
#
unless node.chef_environment == "development"
include_recipe "firewall"
firewall_rule "xmpp" do
port [5222, 5269, 5281]
protocol :tcp
command :allow
end
end
apt_repository "prosody" do
uri "https://packages.prosody.im/debian"
# 15.04 doesn't get new packages anymore, use the ones built for 16.04
distribution node["lsb"]["codename"] == "vivid" ? "xenial" : node["lsb"]["codename"]
components ["main"]
key "https://prosody.im/files/prosody-debian-packages.key"
end
# For SQL backend support
package "lua-dbi-sqlite3"
package "prosody" do
version "0.10.0-1~xenial4"
end
service "prosody" do
action [:enable]
end
unless node.chef_environment == "development"
include_recipe "5apps-xmpp_server::letsencrypt"
# backup the data dir and the config files
node.override["backup"]["archives"]["prosody"] = ["/var/lib/prosody", "/etc/prosody"]
include_recipe "backup"
end