diff options
author | Karl Amrhein <karlamrhein@gmail.com> | 2020-08-12 08:01:38 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-12 08:01:38 -0600 |
commit | a400458de5335da1d91e0c9fc25de6e86008a292 (patch) | |
tree | 850d66b50dd95387f92fc73f7a37055272e5b818 /lib/chef | |
parent | 2505112add8e5e220441a2e5aed5456e7dcc3a72 (diff) | |
download | chef-a400458de5335da1d91e0c9fc25de6e86008a292.tar.gz |
double quotes in example for string interpolation
In the example:
```
execute 'test_rule' do
command 'command_to_run
--option value
--option value
--source \#{node[:name_of_node][:ipsec][:local][:subnet]}
-j test_rule'
action :nothing
end
```
that example command would not run correctly because the variable #{node{node[:name_of_node][:ipsec][:local][:subnet]}
would not be evaluated.
changing to double quotes fixes the example.
Obvious fix.
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/resource/execute.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/resource/execute.rb b/lib/chef/resource/execute.rb index c274f9945d..e8d74fa178 100644 --- a/lib/chef/resource/execute.rb +++ b/lib/chef/resource/execute.rb @@ -161,11 +161,11 @@ class Chef ```ruby execute 'test_rule' do - command 'command_to_run + command "command_to_run --option value --option value --source \#{node[:name_of_node][:ipsec][:local][:subnet]} - -j test_rule' + -j test_rule" action :nothing end |