How do I view a recipe on a chef server?
Asked Answered
S

2

5
knife search node '*:*' -a recipes

gives me all the nodes and their recipes.

knife node show NODE_ID -a recipes

gives me recipes used by a specific node with NODE_ID.

I need to fetch the contents of the recipes that these commands fetch. Even a command to view a specific recipe on the chef server would suffice.

Scrape answered 15/2, 2017 at 19:39 Comment(0)
E
7

knife cookbook show COOKNAME VERSION recipes RECIPENAME.rb

You can also tweak that for other types of files inside a cookbook.

Elwell answered 15/2, 2017 at 19:42 Comment(0)
D
5

You can use the knife cookbook show COOKBOOK [VERSION] [PART] [FILENAME] command:

knife cookbook show mycookbook 1.2.3 recipes default.rb

outputs the default recipe of mycookbook's version 1.2.3

Dentalium answered 15/2, 2017 at 19:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.