Contributors20 minutesPreviously, you bootstrapped your node to your Chef server to apply a basic web server configuration. Later, you updated your configuration policy by modifying the contents of the home page to show the node's FQDN.
In this part, you'll make a second modification to your learn_chef_iis cookbook that, although it might appear correct, will actually fail on your node. You'll then remedy the failure and verify that chef-client succeeds.
You'll practice the process of updating your cookbook, bumping its version metadata, and applying the update to your node. You'll also gain insight into how to resolve failures when something goes wrong.
1. Assign read access to the IIS_IUSRS group
By default, IIS provides access to web content to the IIS_IUSRS group. But let's modify our Chef recipe to ensure that this group has read rights to the c:\inetpub\wwwroot directory.
Recall that your default recipe looks like this.
Editor: ~/learn-chef/cookbooks/learn_chef_iis/recipes/default.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| #
# Cookbook Name:: learn_chef_iis
# Recipe:: default
#
# Copyright (c) 2016 The Authors, All Rights Reserved.
powershell_script 'Install IIS' do
code 'Add-WindowsFeature Web-Server'
guard_interpreter :powershell_script
not_if '(Get-WindowsFeature -Name Web-Server).Installed'
end
service 'w3svc' do
action [:enable, :start]
end
template 'c:\\inetpub\\wwwroot\\Default.htm' do # ~FC033
source 'Default.htm.erb'
end |
To assign read rights to the IIS_IUSRS group, you use the directory resource'srights property.
Modify your default recipe like this. You may notice this recipe has a mistake, but go ahead and copy the recipe exactly as you see it.
Editor: ~/learn-chef/cookbooks/learn_chef_iis/recipes/default.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| #
# Cookbook Name:: learn_chef_iis
# Recipe:: default
#
# Copyright (c) 2016 The Authors, All Rights Reserved.
powershell_script 'Install IIS' do
code 'Add-WindowsFeature Web-Server'
guard_interpreter :powershell_script
not_if "(Get-WindowsFeature -Name Web-Server).Installed"
end
service 'w3svc' do
action [:enable, :start]
end
directory 'c:\\inetpub\\wwwroot' do
rights :read, 'IIS_USRS'
recursive true
action :create
end
template 'c:\\inetpub\\wwwroot\\Default.htm' do
source 'Default.htm.erb'
end |
The directory resource also specifies the :create action, which ensures that the c:\inetpub\wwwroot directory is created if it does not exist.
2. Apply the changes to your node
Next you'll repeat the steps you performed in the previous part to apply your updated configuration on your node.
- Update the cookbook's version metadata.
- Upload the cookbook to Chef server.
- Run
chef-client on your node.
First, modify metadata.rb by setting the version field to '0.3.0'.
Editor: ~/learn-chef/cookbooks/learn_chef_iis/metadata.rb
1
2
3
4
5
6
7
8
9
| name 'learn_chef_iis'
maintainer 'The Authors'
maintainer_email 'you@example.com'
license 'all_rights'
description 'Installs/Configures learn_chef_iis'
long_description 'Installs/Configures learn_chef_iis'
version '0.3.0'
issues_url 'https://github.com/learn-chef/learn_chef_iis/issues' if respond_to?(:issues_url)
source_url 'https://github.com/learn-chef/learn_chef_iis' if respond_to?(:source_url) |
Next, run this knife cookbook upload command to upload your cookbook to the Chef server.
Terminal: ~/learn-chef
$ | knife cookbook upload learn_chef_iisUploading learn_chef_iis [0.3.0]Uploaded 1 cookbook.
|
Finally, run knife winrm to trigger chef-client to run on your node. Here's an example.
Terminal: ~/learn-chef
$ | knife winrm 'name:node1-windows' chef-client --winrm-user Administrator --winrm-password '7pXySo%!Cz' --attribute ipaddress172.31.62.107 Starting Chef Client, version 13.8.5172.31.62.107 172.31.62.107 [2018-05-03T15:34:32+00:00] INFO: *** Chef 13.8.5 ***172.31.62.107 [2018-05-03T15:34:32+00:00] INFO: *** Chef 13.8.5 ***172.31.62.107 [2018-05-03T15:34:32+00:00] INFO: Platform: x64-mingw32172.31.62.107 [2018-05-03T15:34:32+00:00] INFO: Platform: x64-mingw32172.31.62.107 [2018-05-03T15:34:32+00:00] INFO: Chef-client pid: 984172.31.62.107 [2018-05-03T15:34:32+00:00] INFO: Chef-client pid: 984172.31.62.107 [2018-05-03T15:34:32+00:00] INFO: The plugin path C:\chef\ohai\plugins does not exist. Skipping...172.31.62.107 [2018-05-03T15:34:32+00:00] INFO: The plugin path C:\chef\ohai\plugins does not exist. Skipping...172.31.62.107 [2018-05-03T15:34:36+00:00] INFO: Run List is [recipe[learn_chef_iis]]172.31.62.107 [2018-05-03T15:34:36+00:00] INFO: Run List is [recipe[learn_chef_iis]]172.31.62.107 [2018-05-03T15:34:36+00:00] INFO: Run List expands to [learn_chef_iis]172.31.62.107 [2018-05-03T15:34:36+00:00] INFO: Run List expands to [learn_chef_iis]172.31.62.107 [2018-05-03T15:34:36+00:00] INFO: Starting Chef Run for node1-windows172.31.62.107 [2018-05-03T15:34:36+00:00] INFO: Starting Chef Run for node1-windows172.31.62.107 [2018-05-03T15:34:36+00:00] INFO: Running start handlers172.31.62.107 [2018-05-03T15:34:36+00:00] INFO: Running start handlers172.31.62.107 [2018-05-03T15:34:36+00:00] INFO: Start handlers complete.172.31.62.107 [2018-05-03T15:34:36+00:00] INFO: Start handlers complete.172.31.62.107 [2018-05-03T15:34:36+00:00] INFO: Error while reporting run start to Data Collector. URL: https://ec2-34-207-124-26.compute-1.amazonaws.com/organizations/4thcoffee/data-collector Exception: 404 -- 404 "Not Found" (This is normal if you do not have Chef Automate)172.31.62.107 [2018-05-03T15:34:36+00:00] INFO: Error while reporting run start to Data Collector. URL: https://ec2-34-207-124-26.compute-1.amazonaws.com/organizations/4thcoffee/data-collector Exception: 404 -- 404 "Not Found" (This is normal if you do not have Chef Automate)172.31.62.107 resolving cookbooks for run list: ["learn_chef_iis"]172.31.62.107 [2018-05-03T15:34:36+00:00] INFO: Loading cookbooks [learn_chef_iis@0.3.0]172.31.62.107 [2018-05-03T15:34:36+00:00] INFO: Loading cookbooks [learn_chef_iis@0.3.0]172.31.62.107 Synchronizing Cookbooks:172.31.62.107 [2018-05-03T15:34:36+00:00] INFO: Storing updated cookbooks/learn_chef_iis/recipes/default.rb in the cache.172.31.62.107 [2018-05-03T15:34:36+00:00] INFO: Storing updated cookbooks/learn_chef_iis/recipes/default.rb in the cache.172.31.62.107 [2018-05-03T15:34:36+00:00] INFO: Storing updated cookbooks/learn_chef_iis/metadata.rb in the cache.172.31.62.107 [2018-05-03T15:34:36+00:00] INFO: Storing updated cookbooks/learn_chef_iis/metadata.rb in the cache.172.31.62.107 - learn_chef_iis (0.3.0)172.31.62.107 Installing Cookbook Gems:172.31.62.107 Compiling Cookbooks...172.31.62.107 Converging 4 resources172.31.62.107 172.31.62.107 Recipe: learn_chef_iis::default172.31.62.107 * powershell_script[Install IIS] action run[2018-05-03T15:34:37+00:00] INFO: Processing powershell_script[Install IIS] action run (learn_chef_iis::default line 6)172.31.62.107 [2018-05-03T15:34:37+00:00] INFO: Processing powershell_script[Install IIS] action run (learn_chef_iis::default line 6)172.31.62.107 [2018-05-03T15:34:37+00:00] INFO: Processing powershell_script[Guard resource] action run (dynamically defined)172.31.62.107 [2018-05-03T15:34:37+00:00] INFO: Processing powershell_script[Guard resource] action run (dynamically defined)172.31.62.107 [2018-05-03T15:34:37+00:00] INFO: powershell_script[Guard resource] ran successfully172.31.62.107 [2018-05-03T15:34:37+00:00] INFO: powershell_script[Guard resource] ran successfully172.31.62.107 (skipped due to not_if)172.31.62.107 * windows_service[w3svc] action enable[2018-05-03T15:34:37+00:00] INFO: Processing windows_service[w3svc] action enable (learn_chef_iis::default line 12)172.31.62.107 [2018-05-03T15:34:37+00:00] INFO: Processing windows_service[w3svc] action enable (learn_chef_iis::default line 12)172.31.62.107 (up to date)172.31.62.107 * windows_service[w3svc] action start[2018-05-03T15:34:37+00:00] INFO: Processing windows_service[w3svc] action start (learn_chef_iis::default line 12)172.31.62.107 [2018-05-03T15:34:37+00:00] INFO: Processing windows_service[w3svc] action start (learn_chef_iis::default line 12)172.31.62.107 (up to date)172.31.62.107 * directory[c:\inetpub\wwwroot] action create[2018-05-03T15:34:37+00:00] INFO: Processing directory[c:\inetpub\wwwroot] action create (learn_chef_iis::default line 16)172.31.62.107 [2018-05-03T15:34:37+00:00] INFO: Processing directory[c:\inetpub\wwwroot] action create (learn_chef_iis::default line 16)172.31.62.107 172.31.62.107 172.31.62.107 ================================================================================172.31.62.107 Error executing action `create` on resource 'directory[c:\inetpub\wwwroot]'172.31.62.107 ================================================================================172.31.62.107 172.31.62.107 Chef::Exceptions::Win32APIError172.31.62.107 -------------------------------172.31.62.107 No mapping between account names and security IDs was done.172.31.62.107 ---- Begin Win32 API output ----172.31.62.107 System Error Code: 1332172.31.62.107 System Error Message: No mapping between account names and security IDs was done.172.31.62.107 ---- End Win32 API output ----172.31.62.107 172.31.62.107 Resource Declaration:172.31.62.107 ---------------------172.31.62.107 # In c:/chef/cache/cookbooks/learn_chef_iis/recipes/default.rb172.31.62.107 172.31.62.107 16: directory 'c:\\inetpub\\wwwroot' do172.31.62.107 17: rights :read, 'IIS_USRS'172.31.62.107 18: recursive true172.31.62.107 19: action :create172.31.62.107 20: end172.31.62.107 21: 172.31.62.107 172.31.62.107 Compiled Resource:172.31.62.107 ------------------172.31.62.107 # Declared in c:/chef/cache/cookbooks/learn_chef_iis/recipes/default.rb:16:in `from_file'172.31.62.107 172.31.62.107 directory("c:\inetpub\wwwroot") do172.31.62.107 action [:create]172.31.62.107 default_guard_interpreter :default172.31.62.107 declared_type :directory172.31.62.107 cookbook_name "learn_chef_iis"172.31.62.107 recipe_name "default"172.31.62.107 rights [{:permissions=>:read, :principals=>"IIS_USRS"}]172.31.62.107 recursive true172.31.62.107 path "c:\\inetpub\\wwwroot"172.31.62.107 group nil172.31.62.107 mode nil172.31.62.107 owner nil172.31.62.107 end172.31.62.107 172.31.62.107 System Info:172.31.62.107 ------------172.31.62.107 chef_version=13.8.5172.31.62.107 platform=windows172.31.62.107 platform_version=6.3.9600172.31.62.107 ruby=ruby 2.4.3p205 (2017-12-14 revision 61247) [x64-mingw32]172.31.62.107 program_name=C:/opscode/chef/bin/chef-client172.31.62.107 executable=C:/opscode/chef/bin/chef-client172.31.62.107 172.31.62.107 172.31.62.107 [2018-05-03T15:34:37+00:00] INFO: Running queued delayed notifications before re-raising exception172.31.62.107 [2018-05-03T15:34:37+00:00] INFO: Running queued delayed notifications before re-raising exception172.31.62.107 172.31.62.107 Running handlers:172.31.62.107 [2018-05-03T15:34:37+00:00] ERROR: Running exception handlers172.31.62.107 [2018-05-03T15:34:37+00:00] ERROR: Running exception handlers172.31.62.107 Running handlers complete172.31.62.107 [2018-05-03T15:34:37+00:00] ERROR: Exception handlers complete172.31.62.107 [2018-05-03T15:34:37+00:00] ERROR: Exception handlers complete172.31.62.107 Chef Client failed. 0 resources updated in 05 seconds172.31.62.107 [2018-05-03T15:34:37+00:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out172.31.62.107 [2018-05-03T15:34:37+00:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out172.31.62.107 [2018-05-03T15:34:37+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report172.31.62.107 [2018-05-03T15:34:37+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report172.31.62.107 [2018-05-03T15:34:37+00:00] FATAL: Chef::Exceptions::Win32APIError: directory[c:\inetpub\wwwroot] (learn_chef_iis::default line 16) had an error: Chef::Exceptions::Win32APIError: No mapping between account names and security IDs was done.172.31.62.107 ---- Begin Win32 API output ----172.31.62.107 System Error Code: 1332172.31.62.107 System Error Message: No mapping between account names and security IDs was done.172.31.62.107 ---- End Win32 API output ----172.31.62.107 172.31.62.107 [2018-05-03T15:34:37+00:00] FATAL: Chef::Exceptions::Win32APIError: directory[c:\inetpub\wwwroot] (learn_chef_iis::default line 16) had an error: Chef::Exceptions::Win32APIError: No mapping between account names and security IDs was done.172.31.62.107 ---- Begin Win32 API output ----172.31.62.107 System Error Code: 1332172.31.62.107 System Error Message: No mapping between account names and security IDs was done.172.31.62.107 ---- End Win32 API output ----172.31.62.107
|
You see that the chef-client run failed! Here's the error.
Terminal: ~/learn-chef
| Chef::Exceptions::Win32APIError-------------------------------No mapping between account names and security IDs was done.
|
As you may have already realized, the updated configuration attempts to assign read permissions to the IIS_USRS group, instead of the IIS_IUSRS group (note the missing I). This error occurs when the specified user account does not exist.
3. Resolve the failure
Now you'll perform these steps to resolve the failure. Steps 2—4 should be famililar to you.
- Specify the correct group name –
IIS_IUSRS. - Update the cookbook's version metadata.
- Upload the cookbook to Chef server.
- Run
chef-client on your node.
First, modify your default recipe to use the correct account name (IIS_USRS becomes IIS_IUSRS.)
Editor: ~/learn-chef/cookbooks/learn_chef_iis/recipes/default.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| #
# Cookbook Name:: learn_chef_iis
# Recipe:: default
#
# Copyright (c) 2016 The Authors, All Rights Reserved.
powershell_script 'Install IIS' do
code 'Add-WindowsFeature Web-Server'
guard_interpreter :powershell_script
not_if "(Get-WindowsFeature -Name Web-Server).Installed"
end
service 'w3svc' do
action [:enable, :start]
end
directory 'c:\\inetpub\\wwwroot' do
rights :read, 'IIS_IUSRS'
recursive true
action :create
end
template 'c:\\inetpub\\wwwroot\\Default.htm' do
source 'Default.htm.erb'
end |
Next, increment your cookbook's version metadata. Because you're making a bug fix, increment the last part of the version, making the version '0.3.1'.
Editor: ~/learn-chef/cookbooks/learn_chef_iis/metadata.rb
1
2
3
4
5
6
7
8
9
| name 'learn_chef_iis'
maintainer 'The Authors'
maintainer_email 'you@example.com'
license 'all_rights'
description 'Installs/Configures learn_chef_iis'
long_description 'Installs/Configures learn_chef_iis'
version '0.3.1'
issues_url 'https://github.com/learn-chef/learn_chef_iis/issues' if respond_to?(:issues_url)
source_url 'https://github.com/learn-chef/learn_chef_iis' if respond_to?(:source_url) |
Next, upload your cookbook to the Chef server.
Terminal: ~/learn-chef
$ | knife cookbook upload learn_chef_iisUploading learn_chef_iis [0.3.1]Uploaded 1 cookbook.
|
Now run chef-client like you did previously. Here's an example.
Terminal: ~/learn-chef
$ | knife winrm 'name:node1-windows' chef-client --winrm-user Administrator --winrm-password '7pXySo%!Cz' --attribute ipaddress172.31.62.107 Starting Chef Client, version 13.8.5172.31.62.107 172.31.62.107 [2018-05-03T15:34:47+00:00] INFO: *** Chef 13.8.5 ***172.31.62.107 [2018-05-03T15:34:47+00:00] INFO: *** Chef 13.8.5 ***172.31.62.107 [2018-05-03T15:34:47+00:00] INFO: Platform: x64-mingw32172.31.62.107 [2018-05-03T15:34:47+00:00] INFO: Platform: x64-mingw32172.31.62.107 [2018-05-03T15:34:47+00:00] INFO: Chef-client pid: 1208172.31.62.107 [2018-05-03T15:34:47+00:00] INFO: Chef-client pid: 1208172.31.62.107 [2018-05-03T15:34:47+00:00] INFO: The plugin path C:\chef\ohai\plugins does not exist. Skipping...172.31.62.107 [2018-05-03T15:34:47+00:00] INFO: The plugin path C:\chef\ohai\plugins does not exist. Skipping...172.31.62.107 [2018-05-03T15:34:50+00:00] INFO: Run List is [recipe[learn_chef_iis]]172.31.62.107 [2018-05-03T15:34:50+00:00] INFO: Run List is [recipe[learn_chef_iis]]172.31.62.107 [2018-05-03T15:34:50+00:00] INFO: Run List expands to [learn_chef_iis]172.31.62.107 [2018-05-03T15:34:50+00:00] INFO: Run List expands to [learn_chef_iis]172.31.62.107 [2018-05-03T15:34:50+00:00] INFO: Starting Chef Run for node1-windows172.31.62.107 [2018-05-03T15:34:50+00:00] INFO: Starting Chef Run for node1-windows172.31.62.107 [2018-05-03T15:34:50+00:00] INFO: Running start handlers172.31.62.107 [2018-05-03T15:34:50+00:00] INFO: Running start handlers172.31.62.107 [2018-05-03T15:34:50+00:00] INFO: Start handlers complete.172.31.62.107 [2018-05-03T15:34:50+00:00] INFO: Start handlers complete.172.31.62.107 [2018-05-03T15:34:51+00:00] INFO: Error while reporting run start to Data Collector. URL: https://ec2-34-207-124-26.compute-1.amazonaws.com/organizations/4thcoffee/data-collector Exception: 404 -- 404 "Not Found" (This is normal if you do not have Chef Automate)172.31.62.107 [2018-05-03T15:34:51+00:00] INFO: Error while reporting run start to Data Collector. URL: https://ec2-34-207-124-26.compute-1.amazonaws.com/organizations/4thcoffee/data-collector Exception: 404 -- 404 "Not Found" (This is normal if you do not have Chef Automate)172.31.62.107 resolving cookbooks for run list: ["learn_chef_iis"]172.31.62.107 [2018-05-03T15:34:51+00:00] INFO: Loading cookbooks [learn_chef_iis@0.3.1]172.31.62.107 [2018-05-03T15:34:51+00:00] INFO: Loading cookbooks [learn_chef_iis@0.3.1]172.31.62.107 Synchronizing Cookbooks:172.31.62.107 [2018-05-03T15:34:51+00:00] INFO: Storing updated cookbooks/learn_chef_iis/recipes/default.rb in the cache.172.31.62.107 [2018-05-03T15:34:51+00:00] INFO: Storing updated cookbooks/learn_chef_iis/recipes/default.rb in the cache.172.31.62.107 [2018-05-03T15:34:51+00:00] INFO: Storing updated cookbooks/learn_chef_iis/metadata.rb in the cache.172.31.62.107 [2018-05-03T15:34:51+00:00] INFO: Storing updated cookbooks/learn_chef_iis/metadata.rb in the cache.172.31.62.107 - learn_chef_iis (0.3.1)172.31.62.107 Installing Cookbook Gems:172.31.62.107 Compiling Cookbooks...172.31.62.107 Converging 4 resources172.31.62.107 172.31.62.107 Recipe: learn_chef_iis::default172.31.62.107 * powershell_script[Install IIS] action run[2018-05-03T15:34:51+00:00] INFO: Processing powershell_script[Install IIS] action run (learn_chef_iis::default line 6)172.31.62.107 [2018-05-03T15:34:51+00:00] INFO: Processing powershell_script[Install IIS] action run (learn_chef_iis::default line 6)172.31.62.107 [2018-05-03T15:34:51+00:00] INFO: Processing powershell_script[Guard resource] action run (dynamically defined)172.31.62.107 [2018-05-03T15:34:51+00:00] INFO: Processing powershell_script[Guard resource] action run (dynamically defined)172.31.62.107 [2018-05-03T15:34:52+00:00] INFO: powershell_script[Guard resource] ran successfully172.31.62.107 [2018-05-03T15:34:52+00:00] INFO: powershell_script[Guard resource] ran successfully172.31.62.107 (skipped due to not_if)172.31.62.107 * windows_service[w3svc] action enable[2018-05-03T15:34:52+00:00] INFO: Processing windows_service[w3svc] action enable (learn_chef_iis::default line 12)172.31.62.107 [2018-05-03T15:34:52+00:00] INFO: Processing windows_service[w3svc] action enable (learn_chef_iis::default line 12)172.31.62.107 (up to date)172.31.62.107 * windows_service[w3svc] action start[2018-05-03T15:34:52+00:00] INFO: Processing windows_service[w3svc] action start (learn_chef_iis::default line 12)172.31.62.107 [2018-05-03T15:34:52+00:00] INFO: Processing windows_service[w3svc] action start (learn_chef_iis::default line 12)172.31.62.107 (up to date)172.31.62.107 * directory[c:\inetpub\wwwroot] action create[2018-05-03T15:34:52+00:00] INFO: Processing directory[c:\inetpub\wwwroot] action create (learn_chef_iis::default line 16)172.31.62.107 [2018-05-03T15:34:52+00:00] INFO: Processing directory[c:\inetpub\wwwroot] action create (learn_chef_iis::default line 16)172.31.62.107 [2018-05-03T15:34:52+00:00] INFO: directory[c:\inetpub\wwwroot] permissions changed to [BUILTIN\IIS_IUSRS/flags:3/mask:80000000]172.31.62.107 [2018-05-03T15:34:52+00:00] INFO: directory[c:\inetpub\wwwroot] permissions changed to [BUILTIN\IIS_IUSRS/flags:3/mask:80000000]172.31.62.107 172.31.62.107 - change dacl172.31.62.107 * template[c:\inetpub\wwwroot\Default.htm] action create[2018-05-03T15:34:52+00:00] INFO: Processing template[c:\inetpub\wwwroot\Default.htm] action create (learn_chef_iis::default line 22)172.31.62.107 [2018-05-03T15:34:52+00:00] INFO: Processing template[c:\inetpub\wwwroot\Default.htm] action create (learn_chef_iis::default line 22)172.31.62.107 (up to date)172.31.62.107 [2018-05-03T15:34:52+00:00] INFO: Chef Run complete in 1.406216 seconds172.31.62.107 [2018-05-03T15:34:52+00:00] INFO: Chef Run complete in 1.406216 seconds172.31.62.107 172.31.62.107 Running handlers:172.31.62.107 [2018-05-03T15:34:52+00:00] INFO: Running report handlers172.31.62.107 [2018-05-03T15:34:52+00:00] INFO: Running report handlers172.31.62.107 Running handlers complete172.31.62.107 [2018-05-03T15:34:52+00:00] INFO: Report handlers complete172.31.62.107 [2018-05-03T15:34:52+00:00] INFO: Report handlers complete172.31.62.107 Chef Client finished, 1/5 resources updated in 05 seconds
|
You see that the chef-client run succeeds.
Verify the configuration by running curl or by refreshing your web browser.
Terminal: ~/learn-chef
$ | curl 52.91.187.161<html> <body> <h1>hello from WIN-OPJ5HH81G1B.ec2.internal</h1> </body></html>
|
Great work! In practice, you'll want to run your cookbook on a test instance before you upload your work to the Chef server. That way, you'll catch errors like the one you saw here earlier in the process. You learn more about local development in a future module.
Even when you develop your code locally, errors do occur in production. In this part, you were able to quickly fix the error and validate the configuration.