Skip to content
This repository was archived by the owner on Jan 8, 2019. It is now read-only.

Commit de17e37

Browse files
authored
Merge pull request #1245 from http-418/master
Remove unused "admin users" feature
2 parents c480b88 + 35370c3 commit de17e37

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

cookbooks/bcpc/recipes/bootstrap.rb

+8-14
Original file line numberDiff line numberDiff line change
@@ -115,23 +115,17 @@
115115
end
116116
end
117117
end
118+
119+
#
120+
# Admin users have not been (intentionally) active on BACH bootstraps
121+
# in several years. Delete them if found.
122+
#
118123
node[:bcpc][:bootstrap][:admin_users].each do |user_name|
119124
user user_name do
120-
action :create
121-
home "/home/#{user_name}"
122-
group "#{user}"
123-
supports :manage_home => true
125+
action :remove
126+
only_if "id #{user_name}"
127+
ignore_failure true
124128
end
125-
bash 'set group permission on homedir' do
126-
code "chmod 775 /home/#{user_name}"
127-
end
128-
end
129-
130-
sudo 'cluster-interaction' do
131-
user node[:bcpc][:bootstrap][:admin_users] * ','
132-
runas "#{user}"
133-
commands ["/home/#{user}/chef-bcpc/cluster-assign-roles.sh','/home/#{user}/chef-bcpc/nodessh.sh",'/usr/bin/knife']
134-
only_if { node[:bcpc][:bootstrap][:admin_users].length >= 1 }
135129
end
136130

137131
package 'acl'

0 commit comments

Comments
 (0)