From 21f0e4143eb7314c6c6769c944c175b0561d24ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Mon, 8 Apr 2019 17:54:15 +0200 Subject: [PATCH] Move the hubot user creation to its own recipe --- site-cookbooks/kosmos-hubot/recipes/_user.rb | 18 ++++++++++++++++++ site-cookbooks/kosmos-hubot/recipes/default.rb | 12 +----------- site-cookbooks/kosmos-hubot/recipes/hal8000.rb | 1 + 3 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 site-cookbooks/kosmos-hubot/recipes/_user.rb diff --git a/site-cookbooks/kosmos-hubot/recipes/_user.rb b/site-cookbooks/kosmos-hubot/recipes/_user.rb new file mode 100644 index 0000000..d16d23d --- /dev/null +++ b/site-cookbooks/kosmos-hubot/recipes/_user.rb @@ -0,0 +1,18 @@ +# +# Cookbook Name:: kosmos-hubot +# Recipe:: _user +# +# Copyright 2019, Kosmos +# + +group "hubot" do + gid 48268 +end + +user "hubot" do + comment "hubot user" + manage_home true + uid 48268 + gid 48268 + shell "/bin/bash" +end diff --git a/site-cookbooks/kosmos-hubot/recipes/default.rb b/site-cookbooks/kosmos-hubot/recipes/default.rb index 1acd008..30c7091 100644 --- a/site-cookbooks/kosmos-hubot/recipes/default.rb +++ b/site-cookbooks/kosmos-hubot/recipes/default.rb @@ -17,16 +17,6 @@ end include_recipe "kosmos-nodejs" include_recipe "kosmos-redis" -group "hubot" do - gid 48268 -end - -user "hubot" do - comment "hubot user" - uid 48268 - gid 48268 - shell "/bin/bash" -end - +include_recipe "kosmos-hubot::_user" include_recipe "kosmos-hubot::hal8000" include_recipe "kosmos-hubot::botka_freenode" diff --git a/site-cookbooks/kosmos-hubot/recipes/hal8000.rb b/site-cookbooks/kosmos-hubot/recipes/hal8000.rb index f838259..056a132 100644 --- a/site-cookbooks/kosmos-hubot/recipes/hal8000.rb +++ b/site-cookbooks/kosmos-hubot/recipes/hal8000.rb @@ -11,6 +11,7 @@ end include_recipe "kosmos-nodejs" include_recipe "kosmos-redis" +include_recipe "kosmos-hubot::_user" # Needed for hubot-kredits include_recipe "kosmos-ipfs"