diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-08-28 13:27:06 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-10-12 15:34:39 -0700 |
commit | ed8b8c02e092c7b242526ea89d96141aa8305643 (patch) | |
tree | 7c16bf9ddc88f4834829d2660c4ca0f31a98c174 /kitchen-tests | |
parent | bddad37d56607c2182bc9aaff46f874ff5693fc5 (diff) | |
download | chef-ed8b8c02e092c7b242526ea89d96141aa8305643.tar.gz |
chef_client_config resource
Initial stab at a chef_client_config resource that will allow people to easily write out a client.rb. This isn't meant to cover every single use case, but instead to provide a simple resource that works for 99% of users.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'kitchen-tests')
4 files changed, 18 insertions, 10 deletions
diff --git a/kitchen-tests/cookbooks/end_to_end/metadata.rb b/kitchen-tests/cookbooks/end_to_end/metadata.rb index c0c36063ae..fca8dc9c9f 100644 --- a/kitchen-tests/cookbooks/end_to_end/metadata.rb +++ b/kitchen-tests/cookbooks/end_to_end/metadata.rb @@ -5,7 +5,6 @@ version "1.0.0" gem "chef-sugar" -depends "chef-client" depends "logrotate" depends "multipackage" depends "nscd" @@ -23,6 +22,6 @@ supports "opensuseleap" supports "fedora" supports "amazon" -chef_version ">= 14" +chef_version ">= 16" issues_url "https://github.com/chef/chef/issues" source_url "https://github.com/chef/chef" diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb b/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb index 4836fcc188..71395d7364 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb @@ -48,10 +48,6 @@ end ssh_known_hosts_entry "github.com" -include_recipe "chef-client::delete_validation" -include_recipe "chef-client::config" -include_recipe "::_chef_client_trusted_certificate" - include_recipe "openssh" include_recipe "nscd" @@ -87,6 +83,13 @@ user_ulimit "tomcat" do rtprio_hard_limit 60 end +include_recipe "::_chef_client_trusted_certificate" + +chef_client_config "Create chef-client's client.rb" do + chef_server_url "https://localhost" + chef_license "accept" +end + chef_client_cron "Run chef-client as a cron job" chef_client_cron "Run chef-client with base recipe" do diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb index 14b61e4da3..e06d1d1fc9 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb @@ -39,10 +39,13 @@ end ssh_known_hosts_entry "github.com" -include_recipe "chef-client::delete_validation" -include_recipe "chef-client::config" include_recipe "::_chef_client_trusted_certificate" +chef_client_config "Create chef-client's client.rb" do + chef_server_url "https://localhost" + chef_license "accept" +end + chef_client_launchd "Every 30 mins Infra Client run" do interval 30 action :enable diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb b/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb index 2ed8e0a8a6..cc8643facf 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb @@ -79,8 +79,11 @@ users_manage "create sysadmin" do action [:create] end -include_recipe "chef-client::delete_validation" -include_recipe "chef-client::config" +chef_client_config "Create chef-client's client.rb" do + chef_server_url "https://localhost" + chef_license "accept" +end + include_recipe "::_chef_client_trusted_certificate" include_recipe "git" |