I want to run the life node create of the chef without entering it into the editor.

Asked 5 months ago, Updated 5 months ago, 14 views

I'd like to create a node for chef infra server using the knife command from workstation.

knife node create [node_name]

Then you will be asked to enter node information in the editor.
I'd like to automate this part, but is there a way to create nodes with only cli?


2022-09-30 14:04

1 Answers

As far as the documentation goes, there seems to be a way to create a node by specifying a pre-prepared JSON file.

https://docs.chef.io/workstation/knife_node/ #from-file

Use the from file argument to create a node using existing node data as a template.

Example:Create a node using a JSON file

knife node from file "PATH_TO_JSON_FILE"

2022-09-30 14:04

If you have any answers or tips

© 2023 OneMinuteCode. All rights reserved.