summaryrefslogtreecommitdiff
path: root/lib/chef/resource/breakpoint.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource/breakpoint.rb')
-rw-r--r--lib/chef/resource/breakpoint.rb88
1 files changed, 44 insertions, 44 deletions
diff --git a/lib/chef/resource/breakpoint.rb b/lib/chef/resource/breakpoint.rb
index 360c064ff0..9b53fe98b2 100644
--- a/lib/chef/resource/breakpoint.rb
+++ b/lib/chef/resource/breakpoint.rb
@@ -29,61 +29,61 @@ class Chef
description "Use the **breakpoint** resource to add breakpoints to recipes. Run the #{ChefUtils::Dist::Infra::SHELL} in #{ChefUtils::Dist::Infra::PRODUCT} mode, and then use those breakpoints to debug recipes. Breakpoints are ignored by the #{ChefUtils::Dist::Infra::CLIENT} during an actual #{ChefUtils::Dist::Infra::CLIENT} run. That said, breakpoints are typically used to debug recipes only when running them in a non-production environment, after which they are removed from those recipes before the parent cookbook is uploaded to the Chef server."
introduced "12.0"
examples <<~DOC
- **A recipe without a breakpoint**
+ **A recipe without a breakpoint**
- ```ruby
- yum_key node['yum']['elrepo']['key'] do
- url node['yum']['elrepo']['key_url']
- action :add
- end
+ ```ruby
+ yum_key node['yum']['elrepo']['key'] do
+ url node['yum']['elrepo']['key_url']
+ action :add
+ end
- yum_repository 'elrepo' do
- description 'ELRepo.org Community Enterprise Linux Extras Repository'
- key node['yum']['elrepo']['key']
- mirrorlist node['yum']['elrepo']['url']
- includepkgs node['yum']['elrepo']['includepkgs']
- exclude node['yum']['elrepo']['exclude']
- action :create
- end
- ```
+ yum_repository 'elrepo' do
+ description 'ELRepo.org Community Enterprise Linux Extras Repository'
+ key node['yum']['elrepo']['key']
+ mirrorlist node['yum']['elrepo']['url']
+ includepkgs node['yum']['elrepo']['includepkgs']
+ exclude node['yum']['elrepo']['exclude']
+ action :create
+ end
+ ```
- **The same recipe with breakpoints**
+ **The same recipe with breakpoints**
- In the following example, the name of each breakpoint is an arbitrary string.
+ In the following example, the name of each breakpoint is an arbitrary string.
- ```ruby
- breakpoint "before yum_key node['yum']['repo_name']['key']" do
- action :break
- end
+ ```ruby
+ breakpoint "before yum_key node['yum']['repo_name']['key']" do
+ action :break
+ end
- yum_key node['yum']['repo_name']['key'] do
- url node['yum']['repo_name']['key_url']
- action :add
- end
+ yum_key node['yum']['repo_name']['key'] do
+ url node['yum']['repo_name']['key_url']
+ action :add
+ end
- breakpoint "after yum_key node['yum']['repo_name']['key']" do
- action :break
- end
+ breakpoint "after yum_key node['yum']['repo_name']['key']" do
+ action :break
+ end
- breakpoint "before yum_repository 'repo_name'" do
- action :break
- end
+ breakpoint "before yum_repository 'repo_name'" do
+ action :break
+ end
- yum_repository 'repo_name' do
- description 'description'
- key node['yum']['repo_name']['key']
- mirrorlist node['yum']['repo_name']['url']
- includepkgs node['yum']['repo_name']['includepkgs']
- exclude node['yum']['repo_name']['exclude']
- action :create
- end
+ yum_repository 'repo_name' do
+ description 'description'
+ key node['yum']['repo_name']['key']
+ mirrorlist node['yum']['repo_name']['url']
+ includepkgs node['yum']['repo_name']['includepkgs']
+ exclude node['yum']['repo_name']['exclude']
+ action :create
+ end
- breakpoint "after yum_repository 'repo_name'" do
- action :break
- end
- ```
+ breakpoint "after yum_repository 'repo_name'" do
+ action :break
+ end
+ ```
- In the previous examples, the names are used to indicate if the breakpoint is before or after a resource and also to specify which resource it is before or after.
+ In the previous examples, the names are used to indicate if the breakpoint is before or after a resource and also to specify which resource it is before or after.
DOC
default_action :break