Move each vhost to its own config file
This commit is contained in:
@@ -104,6 +104,12 @@ modules:
|
||||
}
|
||||
]
|
||||
|
||||
ldap_domain = node['kosmos-dirsrv']['master_hostname']
|
||||
ldap_encryption_type = node.chef_environment == "development" ? "none" : "tls"
|
||||
ldap_base = "cn=users,dc=kosmos,dc=org"
|
||||
|
||||
admin_users = ejabberd_credentials['admins']
|
||||
|
||||
hosts.each do |host|
|
||||
postgresql_database host[:sql_database] do
|
||||
owner 'ejabberd'
|
||||
@@ -116,14 +122,21 @@ hosts.each do |host|
|
||||
command "psql #{host[:sql_database]}} < #{Chef::Config[:file_cache_path]}/pg.sql"
|
||||
action :nothing
|
||||
end
|
||||
|
||||
template "/opt/ejabberd/conf/#{host[:name]}.yml" do
|
||||
source "vhost.yml.erb"
|
||||
mode 0640
|
||||
owner 'ejabberd'
|
||||
group 'ejabberd'
|
||||
sensitive true
|
||||
variables pgsql_password: postgresql_data_bag_item['ejabberd_user_password'],
|
||||
host: host,
|
||||
ldap_base: ldap_base,
|
||||
ldap_server: ldap_domain,
|
||||
ldap_encryption_type: ldap_encryption_type
|
||||
end
|
||||
end
|
||||
|
||||
ldap_domain = node['kosmos-dirsrv']['master_hostname']
|
||||
ldap_encryption_type = node.chef_environment == "development" ? "none" : "tls"
|
||||
ldap_base = "cn=users,dc=kosmos,dc=org"
|
||||
|
||||
admin_users = ejabberd_credentials['admins']
|
||||
|
||||
template "/opt/ejabberd/conf/ejabberd.yml" do
|
||||
source "ejabberd.yml.erb"
|
||||
mode 0640
|
||||
|
||||
Reference in New Issue
Block a user