diff options
author | Tim Smith <tsmith@chef.io> | 2018-03-12 17:59:59 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-03-15 11:06:09 -0700 |
commit | d88972f463fb7251872cece16d5eedfbc2faa315 (patch) | |
tree | 071d7cd25f59ea47b555ef1854c8d4647c3985e1 /kitchen-tests | |
parent | fb61966bbc7a2d8920d772ff7f3f3fc8543b107d (diff) | |
download | chef-d88972f463fb7251872cece16d5eedfbc2faa315.tar.gz |
Add the sudo resource from the sudo resource
Copied as is with the new description fields added.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'kitchen-tests')
-rw-r--r-- | kitchen-tests/cookbooks/base/attributes/default.rb | 8 | ||||
-rw-r--r-- | kitchen-tests/cookbooks/base/metadata.rb | 1 | ||||
-rw-r--r-- | kitchen-tests/cookbooks/base/recipes/default.rb | 12 |
3 files changed, 11 insertions, 10 deletions
diff --git a/kitchen-tests/cookbooks/base/attributes/default.rb b/kitchen-tests/cookbooks/base/attributes/default.rb index c952f0887e..5e8cee6736 100644 --- a/kitchen-tests/cookbooks/base/attributes/default.rb +++ b/kitchen-tests/cookbooks/base/attributes/default.rb @@ -70,14 +70,6 @@ default["resolver"]["nameservers"] = [ "8.8.8.8", "8.8.4.4" ] default["resolver"]["search"] = "chef.io" # -# sudo cookbook overrides -# - -default["authorization"]["sudo"]["passwordless"] = true -default["authorization"]["sudo"]["groups"] = %w{sysadmin} -default["authorization"]["sudo"]["users"] = %w{vagrant centos ubuntu} - -# # nscd cookbook overrides # diff --git a/kitchen-tests/cookbooks/base/metadata.rb b/kitchen-tests/cookbooks/base/metadata.rb index 87efeb710d..f526318bb7 100644 --- a/kitchen-tests/cookbooks/base/metadata.rb +++ b/kitchen-tests/cookbooks/base/metadata.rb @@ -16,7 +16,6 @@ depends "ntp" depends "openssh" depends "resolver" depends "selinux" -depends "sudo" depends "ubuntu" depends "users" depends "cron" diff --git a/kitchen-tests/cookbooks/base/recipes/default.rb b/kitchen-tests/cookbooks/base/recipes/default.rb index 350b5637e9..dac989cc81 100644 --- a/kitchen-tests/cookbooks/base/recipes/default.rb +++ b/kitchen-tests/cookbooks/base/recipes/default.rb @@ -38,7 +38,17 @@ users_manage "sysadmin" do action [:create] end -include_recipe "sudo" +sudo "sysadmins" do + group ["sysadmin", "%superadmin"] + nopasswd true +end + +sudo "some_person" do + nopasswd true + user "some_person" + commands ["/opt/chef/bin/chef-client"] + env_keep_add %w{PATH RBENV_ROOT RBENV_VERSION} +end include_recipe "chef-client::delete_validation" include_recipe "chef-client::config" |