Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

knife exec docs need an update #1517

Open
coderanger opened this issue Jul 20, 2018 · 1 comment
Open

knife exec docs need an update #1517

coderanger opened this issue Jul 20, 2018 · 1 comment
Assignees
Labels
Aspect: Documentation How do we use this project? Component: Chef Infra Client Documentation Topic: Knife knife commands, guides, enhancements

Comments

@coderanger
Copy link
Contributor

coderanger commented Jul 20, 2018

https://docs.chef.io/knife_exec.html has #{n.memory.total} in an example, that needs to be #{n["memory"]["total"]} or similar.

@callen-IO
Copy link

This still needs to be updated since this will break a knife exec command if using a v13 or newer Chef client.

After downgrading to an older ChefDK version and running the same command, I was able to see this when using #{n.memory.total}:

WARN: method access to node attributes (node.foo.bar) is deprecated and will be removed in Chef 13, please use bracket syntax (node["foo"]["bar"]) (CHEF-4) at -E Argument:in `block in run'.
Please see https://docs.chef.io/deprecations_attributes.html for further details and information on how to correct this problem.

From the deprecation page that is referenced:

Setting and accessing node attributes has been standardized on “bracket” syntax. The older “method” syntax is deprecated and will be removed in Chef 13.

@kagarmoe kagarmoe added Epic Type: Docs Debt For @docs-team. Managing projects, nav, ssg, search, test, and build. and removed Epic labels Sep 25, 2019
@kagarmoe kagarmoe added Topic: Knife knife commands, guides, enhancements Documentation Component: Chef Infra Client and removed Type: Docs Debt For @docs-team. Managing projects, nav, ssg, search, test, and build. labels Apr 8, 2021
@tas50 tas50 added Aspect: Documentation How do we use this project? and removed Documentation labels May 12, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Aspect: Documentation How do we use this project? Component: Chef Infra Client Documentation Topic: Knife knife commands, guides, enhancements
Projects
None yet
Development

No branches or pull requests

4 participants