Switch ejabberd, mastodon and gitea to a hostname for Postgres

This commit is contained in:
Greg Karékinian
2021-01-23 16:43:15 +01:00
parent fdd70d1872
commit bb0e73d1b9
3 changed files with 4 additions and 16 deletions

View File

@@ -138,11 +138,6 @@ ldap_base = "cn=users,dc=kosmos,dc=org"
admin_users = ejabberd_credentials['admins']
postgresql_primary_node = postgresql_primary
postgresql_server = postgresql_primary_node[:ipaddress]
# PostgreSQL is on the same server, connect through localhost
postgresql_server = "localhost" if postgresql_primary_node[:hostname] == node[:hostname]
hosts.each do |host|
ldap_rootdn = "uid=xmpp,ou=#{host[:name]},cn=applications,dc=kosmos,dc=org"
@@ -153,7 +148,7 @@ hosts.each do |host|
group 'ejabberd'
sensitive true
variables pgsql_password: postgresql_data_bag_item['ejabberd_user_password'],
sql_server: postgresql_server,
sql_server: "pg.kosmos.local",
host: host,
ldap_base: ldap_base,
ldap_server: ldap_domain,