Move wormhole from barnard to nodejs-2

Fixed two small bugs in the recipe:

* hubot user wasn't created when necessary
* systemd template always included redis service dependency
This commit is contained in:
Basti 2021-01-05 18:03:15 +01:00
parent 333a76f086
commit fe63f01f7b
Signed by untrusted user: basti
GPG Key ID: 9F88009D31D99C72
4 changed files with 7 additions and 2 deletions

View File

@ -107,7 +107,6 @@
"recipe[kosmos-hubot::botka_freenode]",
"recipe[kosmos-hubot::hal8000]",
"recipe[kosmos-hubot::hal8000_xmpp]",
"recipe[kosmos-hubot::wormhole]",
"recipe[sockethub]",
"recipe[sockethub::proxy]",
"recipe[kosmos-dirsrv]"

View File

@ -65,6 +65,7 @@
},
"run_list": [
"recipe[kosmos-base]",
"recipe[kosmos-hubot::wormhole]",
"role[kredits_github]"
]
}
}

View File

@ -32,6 +32,7 @@ build_essential app_name do
end
include_recipe "kosmos-nodejs"
include_recipe "kosmos-hubot::_user"
application app_path do
data_bag = Chef::EncryptedDataBagItem.load('credentials', app_name)
@ -62,6 +63,7 @@ application app_path do
action :nothing
end
# TODO use chef systemd_service resource
template "/lib/systemd/system/#{app_name}.service" do
source 'nodejs.systemd.service.erb'
owner 'root'
@ -70,6 +72,7 @@ application app_path do
variables(
user: app_user,
group: app_group,
without_redis: true,
app_dir: app_path,
entry: "#{app_path}/bin/hubot -a irc --name #{app_name}",
environment: {

View File

@ -1,7 +1,9 @@
[Unit]
Description=Start nodejs app
<% unless @without_redis %>
Requires=redis-server.service
After=redis-server.service
<% end %>
[Service]
ExecStart=<%= @entry %>