From 69383a666b208d7e574e9d3af1131e93c004383e Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Tue, 20 Oct 2020 15:42:42 +0200 Subject: [PATCH 1/3] Let hal8000 join new info@kosmos.chat room --- site-cookbooks/kosmos-hubot/attributes/default.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/site-cookbooks/kosmos-hubot/attributes/default.rb b/site-cookbooks/kosmos-hubot/attributes/default.rb index 0acddb3..0cb51cf 100644 --- a/site-cookbooks/kosmos-hubot/attributes/default.rb +++ b/site-cookbooks/kosmos-hubot/attributes/default.rb @@ -18,6 +18,7 @@ node.default['hal8000_xmpp']['rooms'] = [ 'kosmos@kosmos.chat', 'kosmos-dev@kosmos.chat', 'kredits@kosmos.chat', + 'info@kosmos.chat' ] node.default['hal8000_xmpp']['auth_admins'] = [] From 4f5b005087af3a6d968fc4ca3348a24c448d3f75 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Tue, 20 Oct 2020 15:44:53 +0200 Subject: [PATCH 2/3] Send wiki notifications to new info XMPP room --- site-cookbooks/kosmos-mediawiki/attributes/default.rb | 4 ++-- site-cookbooks/kosmos-mediawiki/recipes/default.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/site-cookbooks/kosmos-mediawiki/attributes/default.rb b/site-cookbooks/kosmos-mediawiki/attributes/default.rb index 4f58ee5..392f9dd 100644 --- a/site-cookbooks/kosmos-mediawiki/attributes/default.rb +++ b/site-cookbooks/kosmos-mediawiki/attributes/default.rb @@ -1,4 +1,4 @@ node.default["mediawiki"]["url"] = "https://wiki.kosmos.org/" -node.default["mediawiki"]["hubot_base_url"] = "http://barnard.kosmos.org:8080" -node.default["mediawiki"]["hubot_room"] = "#kosmos" +node.default["mediawiki"]["hubot_base_url"] = "https://hal8000.chat.kosmos.org" +node.default["mediawiki"]["hubot_room"] = "info@kosmos.chat" node.default["mediawiki"]["ldap_enabled"] = true diff --git a/site-cookbooks/kosmos-mediawiki/recipes/default.rb b/site-cookbooks/kosmos-mediawiki/recipes/default.rb index 1f1ce8d..1024296 100644 --- a/site-cookbooks/kosmos-mediawiki/recipes/default.rb +++ b/site-cookbooks/kosmos-mediawiki/recipes/default.rb @@ -119,7 +119,7 @@ ark "MediawikiHubot" do action :cherry_pick end -hubot_credentials = Chef::EncryptedDataBagItem.load('credentials', 'hal8000_freenode') +hubot_credentials = Chef::EncryptedDataBagItem.load('credentials', 'hal8000_xmpp') webhook_token = hubot_credentials['webhook_token'] template "#{node['mediawiki']['webdir']}/extensions/MediawikiHubot/DefaultConfig.php" do From 5062392c715cea52df569dd20f512f0a8f4494df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Tue, 20 Oct 2020 19:53:11 +0200 Subject: [PATCH 3/3] Fix the undefined variable in the instance resource --- site-cookbooks/kosmos-dirsrv/resources/instance.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site-cookbooks/kosmos-dirsrv/resources/instance.rb b/site-cookbooks/kosmos-dirsrv/resources/instance.rb index 79c5b5d..3f0d37b 100644 --- a/site-cookbooks/kosmos-dirsrv/resources/instance.rb +++ b/site-cookbooks/kosmos-dirsrv/resources/instance.rb @@ -163,7 +163,7 @@ done # Generate a Let's Encrypt cert (only if the nginx vhost exists and no cert # has been generated before. The renew cron will take care of renewing execute "letsencrypt cert for #{new_resource.hostname}" do - command "/usr/bin/certbot certonly --webroot --agree-tos --email ops@kosmos.org --webroot-path #{root_directory} --deploy-hook /etc/letsencrypt/renewal-hooks/deploy/dirsrv -d #{new_resource.hostname} -n" + command "/usr/bin/certbot certonly --webroot --agree-tos --email ops@kosmos.org --webroot-path /var/www/#{new_resource.hostname} --deploy-hook /etc/letsencrypt/renewal-hooks/deploy/dirsrv -d #{new_resource.hostname} -n" only_if do ::File.exist?("#{node['nginx']['dir']}/sites-enabled/#{new_resource.hostname}_certbot") && !::File.exist?("/etc/letsencrypt/live/#{new_resource.hostname}/fullchain.pem")