diff options
author | Lamont Granquist <lamont@chef.io> | 2019-05-27 13:02:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-27 13:02:05 -0700 |
commit | a6811943104fa1b32eca22f6b38666cef44cd6a0 (patch) | |
tree | 2cf55b772aca18c7d9c06364aae6730df56c8154 | |
parent | 919956e0132255cf7bde7e5dc99f05dd99ccc5d0 (diff) | |
parent | 0e718291d112a7fcd9fe7df04010025a26861ea4 (diff) | |
download | chef-a6811943104fa1b32eca22f6b38666cef44cd6a0.tar.gz |
Merge pull request #8593 from chef/lcg/enable-target-mode
Enable target mode on ruby_block, log and breakpoint
-rw-r--r-- | lib/chef/provider/log.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/ruby_block.rb | 2 | ||||
-rw-r--r-- | lib/chef/resource/breakpoint.rb | 2 | ||||
-rw-r--r-- | lib/chef/resource/log.rb | 1 | ||||
-rw-r--r-- | lib/chef/resource/ruby_block.rb | 2 |
5 files changed, 6 insertions, 3 deletions
diff --git a/lib/chef/provider/log.rb b/lib/chef/provider/log.rb index 8d15883ff6..f0943f9795 100644 --- a/lib/chef/provider/log.rb +++ b/lib/chef/provider/log.rb @@ -21,7 +21,7 @@ class Chef class Log # Chef log provider, allows logging to chef's logs class ChefLog < Chef::Provider - provides :log + provides :log, target_mode: true # No concept of a 'current' resource for logs, this is a no-op # diff --git a/lib/chef/provider/ruby_block.rb b/lib/chef/provider/ruby_block.rb index 01f041ca3b..f5efc42054 100644 --- a/lib/chef/provider/ruby_block.rb +++ b/lib/chef/provider/ruby_block.rb @@ -20,7 +20,7 @@ class Chef class Provider class RubyBlock < Chef::Provider - provides :ruby_block + provides :ruby_block, target_mode: true def load_current_resource true diff --git a/lib/chef/resource/breakpoint.rb b/lib/chef/resource/breakpoint.rb index 0118d06bdf..0e37a29787 100644 --- a/lib/chef/resource/breakpoint.rb +++ b/lib/chef/resource/breakpoint.rb @@ -22,7 +22,7 @@ require_relative "../dist" class Chef class Resource class Breakpoint < Chef::Resource - provides :breakpoint + provides :breakpoint, target_mode: true resource_name :breakpoint description "Use the breakpoint resource to add breakpoints to recipes. Run the chef-shell in #{Chef::Dist::CLIENT} mode, and then use those breakpoints to debug recipes. Breakpoints are ignored by the #{Chef::Dist::CLIENT} during an actual #{Chef::Dist::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." diff --git a/lib/chef/resource/log.rb b/lib/chef/resource/log.rb index da996f28ba..b642b5dee2 100644 --- a/lib/chef/resource/log.rb +++ b/lib/chef/resource/log.rb @@ -30,6 +30,7 @@ class Chef # end class Log < Chef::Resource resource_name :log + provides :log, target_mode: true description "Use the log resource to create log entries. The log resource behaves"\ " like any other resource: built into the resource collection during the"\ diff --git a/lib/chef/resource/ruby_block.rb b/lib/chef/resource/ruby_block.rb index 92e1f926bf..c0cb4d95e4 100644 --- a/lib/chef/resource/ruby_block.rb +++ b/lib/chef/resource/ruby_block.rb @@ -24,6 +24,8 @@ require_relative "../dist" class Chef class Resource class RubyBlock < Chef::Resource + provides :ruby_block, target_mode: true + description "Use the ruby_block resource to execute Ruby code during a #{Chef::Dist::CLIENT} run."\ " Ruby code in the ruby_block resource is evaluated with other resources during"\ " convergence, whereas Ruby code outside of a ruby_block resource is evaluated"\ |