Reputation: 17589
A fresh run of kitchen converge
runs fine. However, the second run halts at preparing client.rb
Has anyone ever encountered this issue? How should I debug this problem?
Upvotes: 1
Views: 1047
Reputation: 353
I was having the same issue. The best way is solving that using kitchen. In my case add to my .kitchen.yml
file these attributes:
attributes:
authorization:
sudo:
passwordless: true
include_sudoers_d: true
If you don't want to affect all the users you can choose specific users using members
. I recommend to use this option because it keeps your recipes agnostic.
Upvotes: 0
Reputation: 15503
I was doing this with vagrant (1.8.1) and kitchen (1.5.0). denniss in his answer above, was mucking around with the 'sudo' group in his answer above and so was I. To fix that, I added the default "vagrant" user to the sudo group in my user recipe as follows replacing the old members() line with the new one which adds "vagrant" to the group (even though this recipe is not managing the "vagrant" user).
# . . . /myapp/recipes/users_recipe.rb
#
include_recipe "users"
group 'sudo'
user 'jgodse' do
action :lock
group 'sudo'
system true
shell '/bin/bash'
home '/home/jgodse'
manage_home true
password '$1$xyz$35Ph9JlxB.1tGXqrCgX5y0'
end
group 'sudo' do
action :modify
### members ["jgodse","sysadministrator"] ###old code
members ["jgodse","sysadministrator", "vagrant"] #new code
append true
end
Upvotes: 3
Reputation: 17589
I was messing around with /etc/sudoers
and revoked sudo access to root user. I decided to just add the user to gid "sudo"
instead.
Upvotes: 2